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 type of the returned content..
image
Cache-Control
Specifies the caching mechanism for both requests and responses..
no-cache
Content-Disposition
Specifies the default file name used when the returned content is displayed as an attachment..
123.txt
Content-Language
Specifies the languages intended for the audience..
zh-CN
Expires
Specifies the time after which the response is considered stale..
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 how long the browser can cache the results of a preflight request for a specific resource.. Unit: seconds.
600
Access-Control-Expose-Headers
Specifies the custom headers that can be accessed.
Content-Length