HTTP headers are the header fields included in HTTP requests and responses. This topic describes how to configure HTTP headers.
Usage notes
HTTP header settings apply to all resources under the accelerated domain name and affect request responses, but do not affect cache servers.
Wildcard domain names are not supported.
Procedure
- Log on to the ApsaraVideo Live console.
In the left navigation pane, click Domain Names. The Domain Management page appears.
Find the streaming domain that you want to configure and click Domain Settings in the Actions column.
Click .
Click Add.
In the HTTP Header Configuration dialog box, select a Header, enter a Value, and click OK.
The following table lists parameters and their descriptions.
Parameter
Description
Example
Content-Type
Specifies the content type of the response object for the client program.
image
Cache-Control
Specifies the caching mechanism that the client program must follow for requests and responses.
no-cache
Content-Disposition
Specifies the default file name provided when the client program saves the retrieved content as a file.
123.txt
Content-Language
Specifies the language of the response object for the client program.
zh-CN
Expires
Specifies the time-to-live (TTL) of the response object for the client program.
Wed, 21 Oct 2015 07:28:00 GMT
Access-Control-Allow-Origin
Specifies the allowed origins for cross-origin requests.
*
NoteYou can enter
*to allow all domains. You can also enter a complete domain name, such aswww.aliyundoc.com. Cross-origin configuration currently supports only*or a single domain name. To allow cross-origin access from multiple domains, configure this parameter as*.Access-Control-Allow-Headers
Specifies the allowed fields for cross-origin requests.
X-Custom-Header
Access-Control-Allow-Methods
Specifies the allowed methods for cross-origin requests.
POST, GET
NoteTo add both POST and GET, separate them with a half-width comma (,).
Access-Control-Max-Age
Specifies the cache duration, in seconds, for preflight request responses to a specific resource by the client program.
600
Access-Control-Expose-Headers
Specifies the custom headers that can be accessed.
Content-Length