Skip to main content

Add personalized HTTP headers in the response to the user

Last update:

You can add HTTP headers in response to a user request. For example, to manage caching or to pass service information.

HTTP headers can be hidden from the user.

If you have CORS validation enabled on the CDN side, the personal headers will be added to the response after validation. If the personal header and the header specified in CORS match, the personal header value will be displayed in the response to the user. For example, the Access-Control-Allow-Origin header in CORS is set to https://example.com and the personal header value is set to *. After the CORS check, the browser will receive the Access-Control-Allow-Origin:*. header in the response.

  1. In the Control Panel, on the top menu, click Products and select CDN.

  2. In the CDN Resources section, open the resource page → Headings tab.

  3. In the Headers for Customer block, click Add Header.

  4. Enter the title of the header. You can use Latin letters, numbers, underscores and hyphens.

  5. Enter the value of the title. You can use Latin letters, numbers, underscore, period, slash, colon, hyphen, equals, and space. Space can only be added within the value and between words. Do not put a space at the beginning and end of a value.

  6. If you need to add multiple headers, click Add Header and repeat steps 4-5.

  7. If the headers need to be hidden from the user, select them from the list of added headers.

  8. Click Apply. The resource will be in PROCESSING status while the settings are being applied . You cannot apply any other settings at this time. The settings will be applied when the share changes to ACTIVE status.

  9. Clear the resource cache.