Enabling or Disabling Redirect Retrieval
Function
If this function is enabled, and a CDN node receives a response with status code 302 after sending a content retrieval request to the origin server, the CDN code will jump to the address specified in the response, obtain and cache the content, and forward the content to users.
URI
PUT /v1.0/cdn/domains/{domain_id}/follow302-switch
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| domain_id | Yes | String | Specifies the acceleration domain name ID. For details, see Querying Details About a Domain Name. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | Enterprise project that the domain name to be modified belongs to. This parameter is valid only when the enterprise project function is enabled. The value all indicates all projects. This parameter is mandatory when you use an IAM user to call this API. Obtain the enterprise project ID by calling the ListEnterpriseProject API of Enterprise Project Management Service (EPS). |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Specifies the user token. The token can be obtained by calling the IAM API used to obtain a user token. The value of **X-Subject-Token** in the response header is the user token. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| follow302_status | Yes | String | Specifies the status of 302 redirect retrieval. Possible values: off and on. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| follow_status | Follow302StatusBody object | Specifies the redirect retrieval settings. |
Example Requests
PUT https://cdn.myhuaweicloud.com/v1.0/cdn/domains/ff1a*********************00ea/follow302?enterprise_project_id=0
{
"follow302_status" : "on"
} Example Responses
Status code: 200
OK
{
"follow_status" : {
"domain_id" : "ff1a*********************00ea",
"follow_status" : "off"
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.
Last Article: Enabling or Disabling Range-based Retrieval
Next Article: Configuring a Referer List
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.