设置SEO开关属性
更新时间:2020-07-08
接口
本接口用于设置SEO开关属性。
Method | Path | 说明 |
---|---|---|
PUT | /v2/domain/{domain}/config?seoSwitch | 设置 seo 开关属性 |
domain:修改配置的CDN加速域名。
请求体(Request Body)
参数 | 可选 | 类型 | 说明 |
---|---|---|---|
seoSwitch | 必选 | seoSwitch | 设置 seo 开关属性 |
seoSwitch 类型如下:
参数 | 可选 | 类型 | 说明 |
---|---|---|---|
diretlyOrigin | 可选 | String | ON 表示设置直接回源,OFF 则相反 |
pushRecord | 可选 | String | ON 表示给百度搜索推送访问记录,OFF则相反 |
diretlyOrigin 和 pushRecord 只能取 "ON | OFF"。
响应码 (Http Status Code)
HTTP Status Code | 说明 |
---|---|
200 | 成功 |
400 | 更新失败,参数错误等 |
响应体 (Response Body)
参数 | 类型 | 说明 |
---|---|---|
status | String | 刚更新成功返回的status是OPERATING |
请求示例:
PUT /v2/domain/myself.baidu.com/config?seoSwitch HTTP/1.1
Host: cdn.baidubce.com
Content-Length: 72
Content-Type: text/json;utf-8
{
"seoSwitch": {"diretlyOrigin": "ON","pushRecord" : "OFF"}
}
响应示例:
Sample Response
HTTP/1.1 200 OK
Server: nginx/1.14.0
Date: Fri, 21 Sep 2018 03:46:35 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.6.36
x-bce-request-id: dd490e5d-64da-e2b-1cdd-fc98c864dfd
{"status":"OPERATING"}