Set the HTTP request header

Last Updated: May 03, 2017

Introduction

You can set an HTTP request header. Eight HTTP request header parameters are available for customization. The parameters are as follows:

Parameter Description
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.

Note:

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

Operation procedure

  1. Log on to the CDN console.

  2. On the left navigation bar, click CDN domain name list.

  3. Select a domain to enter the management page.

  4. On the left navigation bar, click Set Http Header.

  5. Click Add Http Header.

    add http header

Thank you! We've received your feedback.