Configure HTTP headers

更新时间:
复制 MD 格式

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

  1. Log on to the ApsaraVideo Live console.
  2. In the left navigation pane, click Domain Names. The Domain Management page appears.

  3. Find the streaming domain that you want to configure and click Domain Settings in the Actions column.

  4. Click Streaming Management > HTTP Header Settings.

  5. Click Add.

  6. 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.

    *

    Note

    You can enter * to allow all domains. You can also enter a complete domain name, such as www.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

    Note

    To 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