Found 0 result in total

Content is empty
If you don't find the content you expect, please try another search term
Content Delivery Network (CDN)
API Documentation
Domain Detailed Configuration
SetErrorPageConfig
Last updated:2021-03-17 11:08:31
You can call this operation to configure custom error pages. For more information about the supported error codes, see Usage notes.
Note:
No custom error pages are configured by default after a domain name is added.
The API request contains the specified directory /2016-09-01/domain/SetErrorPageConfig, common request headers, and operation-specific request parameters. For more information, see the sample request.
| Header | Required | Type | Description |
|---|---|---|---|
| X-Version | Yes | String | The version number. Set the value to 2016-09-01. |
| X-Action | Yes | String | The operation that you want to perform. Set the value to SetErrorPageConfig. |
| Parameter | Required | Type | Description |
|---|---|---|---|
| DomainId | Yes | String | The ID of the domain name. |
| ErrorPages | Yes | ErrorPage[] | The array of custom error pages. The array is ordered. If multiple pages are configured for a status code in the array, the last page takes effect. |
ErrorPage
| Parameter | Required | Type | Description |
|---|---|---|---|
| ErrorHttpCode | Yes | String | The HTTP status code of the error. |
| CustomPageUrl | Yes | String | The URL of the custom page that is displayed when the error occurs. Note: The URL must start with https:// or http://. Otherwise, an error message is returned, indicating that the input URL is invalid. |
Sample request
POST method:
POST /2016-09-01/domain/SetErrorPageConfig
Host: cdn.api.ksyun.com
X-Amz-Date: date
Authorization:authorization string
x-action: SetErrorPageConfig
x-version: 2016-09-01
Content-Type: application/json
{
"DomainId": "2D08M8V",
"ErrorPages":
[{
"ErrorHttpCode":"404",
"CustomPageUrl":"https://www.test.com/error404.html"
},
{
"ErrorHttpCode":"403",
"CustomPageUrl":"https://www.test.com/error403.html"
}]
}
Sample response
Pure Mode