tencent cloud

Feedback

HTTP Response Header Configuration

Last updated: 2022-08-02 14:53:10

    You can use HTTP headers to define fields that carry information about HTTP transactions. Header fields work on the domain level. This means the header fields you configure will take effect for all responses under your domain.

    Prerequisites

    Use Limits

    • You can configure at most 10 header fields.
    • You cannot add two fields with the same name. To specify multiple values for a field, use this format: value 1, value 2, value 3.
    • If a field you configure is the same as a field used by the CSS backend, you will be asked to modify it.
    • A custom field can be 1-100 characters long and can contain letters, numbers, and hyphens (-).
    • The value of a field cannot be empty. It can be 1-1,000 characters long and cannot contain Chinese characters.

    Configuring HTTP Response Header

    1. Go to Domain Management. Click the name of your playback domain or click Manage on the right.
    2. Select the Advanced Configuration tab.
    3. In the HTTP response headers area, click Edit to add new header fields or modify/delete existing header fields.

      To add a header field, click New.
    • Select Preset to add a preset field: Access-Control-Allow-Methods, Access-Control-Max-Age, or Access-Control-Expose-Headers.
    FieldDescription
    Access-Control-Allow-Methods Indicates which HTTP methods are allowed for cross-origin requests. You can specify multiple methods at a time:
    Access-Control-Allow-Methods: POST, GET, OPTIONS.
    Access-Control-Max-Age Indicates how long (seconds) the results of a preflight request can be cached
    Access-Control-Expose-Headers Indicates which headers can be exposed to clients as part of the response
    • Select Custom to add a custom field.
    Note:

    The name of a custom field can be 1-100 characters long and can contain letters, numbers, and hyphens. The value of a custom field can be 1-1,000 characters long and cannot contain Chinese characters.


    5. When you are finished, Click OK. Your configuration may be in one of three statuses: yet to take effect, failed, or effective.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support