You can set an HTTP request header. Eight HTTP request header parameters are available for customization. The parameters are as follows:
|Content-Type||Specifies a content type for the response returned to a client program.|
|Cache-Control||Specifies a cache mechanism that is typically following the request/response process of a client program.|
|Content-Disposition||Specifies a default filename for activating the file download setting when a response is returned to a client program.|
|Content-Language||Specifies a language in which a response is returned to a client program.|
|Expires||Specifies expiration time for the response returned to a client program.|
|Access-Control-Allow-Origin||Specifies an origin that is allowed to send cross-domain requests.|
|Access-Control-Allow-Methods||Specifies the allowed cross-domain request method.|
|Access-Control-Max-Age||Specifies the cache duration of the returned result for a pre-fetch request initiated by a client program for a particular resource.|
The HTTP request header setting will affect responses to client programs (for example, browser) for all resources under the CDN domain, but will not affect the behavior of the cache server.
Only the preceding HTTP header parameters are supported currently. If additional requirements for HTTP header settings are required, please submit a ticket to Alibaba Cloud technical support.
The Access-Control-Allow-Origin parameter can be set to
*(indicating all domains) or to a complete domain name such as
www.aliyun.com. Wildcard domain setting is not supported currently.
Log on to the CDN console
On the left-side navigation pane, click Domain Names.
Select a domain to enter the management page.
On the left navigation bar, click Set HTTP Header.
Click Add HTTP Header.