Baidu AI Cloud
中国站

百度智能云

CDN

Set Forward-to-origin Protocol

Interface

This interface is used to set the origin protocol of the specified domain name.

Method Path Description
PUT /v2/domain/{domain}/config?originProtocol Configure origin protocol

domain: Modify the configured CDN acceleration domain name.

Request body

Parameter Optional Type Description
originProtocol Required originProtocol Origin protocol configuration

originProtocolType description

Parameter Optional Type Description
value Required string The value is “https”, “http” or “*”, respectively representing https origin, http origin and protocol follow origin. To set https, you have to enable https acceleration first.

Response code (Http Status Code)

HTTP Status Code Description
200 Success
400 Update failures, parameter errors, etc.

Request example

PUT /v2/domain/myself.baidu.com/config?originProtocol HTTP/1.1 
Host: cdn.baidubce.com 
Content-Length: 18
Content-Type: text/json;utf-8

{ 
    "originProtocol": { 
        "value": "http" 
    } 
} 

Response example

HTTP/1.1 200 OK 
Server: nginx 
Date: Wed, 26 Jun 2019 06:07:42 GMT 
Content-Type: application/json; charset=utf-8 
Transfer-Encoding: chunked 
Connection: keep-alive 
X-Powered-By: PHP/7.1.5 
x-bce-request-id: eb565e40-3052-fe36-a7d2-31f5bc2e7fd5

{"status":"RUNNING"} 
Previous
Set the Range Forwarding to Origin
Next
Set the Mobile Access Control