HTTP headers define the resources being requested, the behavior of the client or server, and the operating parameters of an HTTP transaction. This topic describes how to customize an HTTP response header.
HTTP headers are components of the header section of request and response messages transmitted over Hypertext Transfer Protocol (HTTP).
HTTP headers include general headers, request headers, and response headers.
- The HTTP response header configurations of a domain affect how a client program such as a browser responds to all requests destined for this domain. The configurations do not affect the behavior of the cache server.
- Dynamic Route for CDN (DCDN) supports only the 10 HTTP response headers described in this topic. If you want to specify other HTTP response headers, submit a ticket.
- You can set the value of the
Access-Control-Allow-Originheader to an asterisk (
*) to specify all domains or to a specific domain name such as
- DCDN does not support configuring response headers for wildcard domains.
- Log on to the Dynamic Route for CDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the target domain name and click Configure.
- In the left-side navigation pane of the specified domain, click Caching.
- Click the HTTP Header tab.
- On the HTTP Header tab, click Add.
- In the HTTP Header Setting dialog box that appears, select an HTTP header from the
Parameter drop-down list and set its value.
The following table describes the 10 HTTP response headers provided by DCDN.
Header name Description Example Content-Type Specifies the MIME type of the content returned by a client program. image Cache-Control Specifies the caching policy that a client program follows when making responses. no-cache Content-Disposition Specifies the default file name provided by a client program when the requested content is saved as a file. 123.txt Content-Language Specifies the language of the intended audience for the returned content. en-US Expires Specifies the date and time after which the response is considered stale. Wed, 21 Oct 2019 07:28:00 GMT Access-Control-Allow-Origin Specifies the origins from which cross-origin requests are allowed. * Access-Control-Allow-Headers Specifies the fields that are allowed in cross-origin requests. X-Custom-Header Access-Control-Allow-Methods Specifies the request methods that are allowed for cross-origin requests. POST, GET Access-Control-Max-Age Specifies the time-to-live (TTL) value during which the response can be cached for a prefetch request initiated by a client program for a particular resource. 600 Access-Control-Expose-Headers Specifies the headers that can be exposed as part of the response. Content-Length
- Click OK.
To modify or delete the HTTP response header, you can click Modify or Delete in the Actions column on the HTTP Header tab.