设置SEO开关属性
更新时间:2022-07-15
接口
本接口用于设置SEO开关属性。
Method | Path | 说明 |
---|---|---|
PUT | /v2/domain/{domain}/config?seoSwitch | 设置SEO开关属性 |
domain:修改配置的CDN加速域名。
请求体
参数 | 可选 | 类型 | 说明 |
---|---|---|---|
seoSwitch | 必选 | SeoSwitch | 设置 seo 开关属性 |
SeoSwitch类型如下:
参数 | 可选 | 类型 | 说明 |
---|---|---|---|
diretlyOrigin | 可选 | string | 可选值为"ON"和"OFF",ON表示设置直接回源,OFF则相反 |
响应码
HTTP Status Code | 说明 |
---|---|
200 | 成功 |
400 | 更新失败,参数错误等 |
响应体
参数 | 类型 | 说明 |
---|---|---|
status | String | 更新成功返回的status是OPERATING |
请求/响应示例
Text
1PUT /v2/domain/test.baidu.com/config?seoSwitch HTTP/1.1
2Host: cdn.baidubce.com
3Content-Length: 72
4Content-Type: application/json
5{
6 "seoSwitch": {"diretlyOrigin": "ON"}
7}
8
9HTTP/1.1 200 OK
10Server: nginx/1.14.0
11Date: Fri, 21 Sep 2018 03:46:35 GMT
12Content-Type: application/json; charset=utf-8
13Transfer-Encoding: chunked
14Connection: keep-alive
15X-Powered-By: PHP/5.6.36
16x-bce-request-id: dd490e5d-64da-e2b-1cdd-fc98c864dfd
17
18{"status":"OPERATING"}