HTTP Protocol Settings

Last update:2026-07-02 17:32:18

In Protocol Settings, you can add, replace, or remove HTTP headers in selected request or response directions, and you can turn on HTTP/2 for client connections.

Before you begin

  • For custom headers, prepare the header name and value before you create the rule.

Configure HTTP header rules

Create an HTTP header rule to add, replace, or remove headers for selected request or response directions.

  1. In Configuration, open Edit Configuration for the target domain.
  2. In the navigation pane, choose Protocol Settings > HTTP Headers.
  3. Choose Add.
  4. In the HTTP Headers dialog, configure the rule.
Field Description
Apply to Select Specific File Type, Specific Directory, or URL Pattern (Regex). Use this field to keep the rule scoped to the playback paths, file extensions, or URL patterns that need the header change. For Specific Directory, enter directory path(s), one per line.
Action Select Add, Replace, or Remove. Choose the action based on whether the header is missing, present with the wrong value, or should not continue in the selected direction.
HTTP Headers Select the HTTP header to add, replace, or remove.
Custom HTTP Header Enter a custom HTTP header. For Remove, you can enter multiple headers and separate them with semicolons (;). For Add and Replace, enter only one header.
Old Value Appears for Replace. Enter the existing header value to be replaced.
New Value Enter the new header value.
Apply Rule to Select one or more directions: Request to Origin, Response to Client, Response from Origin, or Request from Client. See Choose the right direction for more details.
Priority Enter the rule priority.
  1. Choose Confirm.

Choose an HTTP header action

The action determines how CDN handles the selected HTTP header.

Action Behavior Use when
Add Adds a new HTTP header. Select a header and specify its value in New Value. CDN should add a header in the selected direction.
Replace Replaces the value of an existing HTTP header. Select a header, then specify Old Value and New Value. CDN should replace a known header value with another value.
Remove Removes one or more HTTP headers. Select one or more headers to remove, separated by semicolons (;). CDN should remove the selected header from the selected direction.

Restriction: Some headers support only specific actions and directions. If the selected header, action, and direction are not supported together, the dialog displays an error.

Choose the right direction

The Apply Rule to field controls the traffic direction where CDN processes the header. Select the direction based on who sends the message and who receives the modified message.

Direction Traffic segment What it means Common CDN and streaming use
Request from Client Player, browser, or application to CDN A header sent by the playback client before CDN handles the request Handle request headers such as Accept, Accept-Encoding, Accept-Language, Referer, or User-Agent when the rule is about client request metadata.
Request to Origin CDN to origin A header sent by CDN when it requests content from the origin Add or replace origin-facing headers, such as a custom host or routing header required by the origin.
Response from Origin Origin to CDN A header returned by the origin before CDN returns the response to the client Normalize origin response headers before CDN continues response processing.
Response to Client CDN to player, browser, or application A header visible to the playback client in the final CDN response Add response headers needed by playback clients, such as CORS headers or content-related headers.

Configure HTTP/2

Turn on HTTP/2 to let CDN use HTTP/2 for client connections.

  1. In Configuration, open Edit Configuration for the target domain.
  2. In the navigation pane, choose Protocol Settings > HTTP/2.
  3. Turn on HTTP/2.

The HTTP/2 switch shows the enabled state.

Note: HTTP/2 enables HTTP/2 for client connections. To configure the connections to your origin, use Origin Protocol Version. Not all products support using HTTP/2 for origin connections. Contact Technical Support for more details.

Reference

Supported header actions

Category Header Supported actions Supported directions
Accept-related Access-Control-Allow-Origin Add, Replace, Remove Response headers
Accept-related Access-Control-Allow-Methods Add, Replace, Remove Response headers
Accept-related Accept Add, Replace, Remove Request headers
Accept-related Accept-Encoding Add, Replace, Remove Request headers
Accept-related Accept-Charset Add, Replace, Remove Request headers
Accept-related Accept-Language Add, Replace, Remove Request headers
Accept-related Accept-Ranges Add, Replace, Remove Request headers
Content-related Content-Base Replace Response headers
Content-related Content-Disposition Replace Response headers
Content-related Content-Encoding Replace Response headers
Content-related Content-Language Replace Response headers
Content-related Content-Location Replace Response headers
Content-related Content-MD5 Replace Response headers
Content-related Content-Range Replace Response headers
Content-related Content-Type Replace Response headers
Cache-related Vary Add, Replace, Remove Response headers
State-related Cookie Add, Replace, Remove Request headers
State-related Set-Cookie Add, Replace, Remove Response headers
Other Referer Replace Request headers
Other Server Replace Response headers
Other User-Agent Replace Request headers
Other Custom header Add, Replace, Remove Request or response headers
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!