You can call this operation to configure the origin protocol policy for a CDN domain.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SetForwardSchemeConfig

The operation that you want to perform. Set the value to SetForwardSchemeConfig.

DomainName String Yes www.macaron.org.cn

The name of the CDN domain to configure the origin protocol policy.

Enable String Yes on

Specifies whether to enable the origin protocol policy.

  • on: enables the feature.
  • off: disables the feature.
SchemeOrigin String Yes follow

The origin protocol policy. Valid values:

  • http
  • https
  • follow: CDN communicates with the origin by using HTTP or HTTPS, depending on the protocol of the client request.
SchemeOriginPort String Yes 80:443

The port used to communicate with the origin. Valid values: 80, 443, and 80:443, which correspond to http, https, and follow of SchemeOrigin, respectively.

Response parameters

Parameter Type Example Description
RequestId String DD6193E9-CC5A-4C08-9207-6B73DF0892BF

The ID of the request.

Examples

Sample requests

http(s)://cdn.aliyuncs.com? Action=SetForwardSchemeConfig
&DomainName=www.macaron.org.cn
&Enable=on
&SchemeOrigin=follow
&SchemeOriginPort=80:443
&<Common request parameters>

Sample success responses

XML format

<SetErrorPageConfigResponse>
      <RequestId>EED8D7F7-861D-42B7-8255-F902215926A5</RequestId>
</SetErrorPageConfigResponse>

JSON format

{
	"RequestId":"04F0F334-1335-436C-A1D7-6C044FE73368"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidEnable.ValueNotSupported The specified value of parameter Enable is not supported. The error message returned because the specified Enable parameter is not supported. Valid values are on and off.
400 InvalidSchemeOrigin.ValueNotSupported The specified value of parameter SchemeOrigin is not supported. The error message returned because the specified SchemeOrigin parameter is not supported.
400 InvalidSchemeOriginPort.ValueNotSupported The specified value of parameter SchemeOriginPort is not supported. The error message returned because the specified SchemeOriginPort parameter is not supported.

For more information about error codes, visit API Error Center.