设置回源协议
更新时间:2020-06-02
接口
本接口用于设置指定域名的回源协议。
| Method | Path | 说明 | 
|---|---|---|
| PUT | /v2/domain/{domain}/config?originProtocol | 配置回源协议 | 
domain:修改配置的CDN加速域名。
请求体(Request Body)
| 参数 | 可选 | 类型 | 说明 | 
|---|---|---|---|
| originProtocol | 必选 | originProtocol | 回源协议配置 | 
originProtocol类型说明
| 参数 | 可选 | 类型 | 说明 | 
|---|---|---|---|
| value | 必选 | string | 值为"https", "http" 或者 "*",分别代表https回源,http回源,以及协议跟随回源。设置https需要先开启https加速 | 
响应码 (Http Status Code)
| HTTP Status Code | 说明 | 
|---|---|
| 200 | 成功 | 
| 400 | 更新失败,参数错误等 | 
请求示例
                Text
                
            
            1PUT /v2/domain/myself.baidu.com/config?originProtocol HTTP/1.1
2Host: cdn.baidubce.com
3Content-Length: 18
4Content-Type: text/json;utf-8
5
6{
7    "originProtocol": {
8        "value": "http"
9    }
10}
            响应示例
                Text
                
            
            1HTTP/1.1 200 OK
2Server: nginx
3Date: Wed, 26 Jun 2019 06:07:42 GMT
4Content-Type: application/json; charset=utf-8
5Transfer-Encoding: chunked
6Connection: keep-alive
7X-Powered-By: PHP/7.1.5
8x-bce-request-id: eb565e40-3052-fe36-a7d2-31f5bc2e7fd5
9
10{"status":"RUNNING"}
            