> For the complete documentation index, see [llms.txt](https://clients.medianova.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/headers/custom-header.md).

# Custom Header

Learn how to configure Custom Header rules for a CDN Resource.

**Custom Header** provides header-level control over the CDN request and response flow. You can define multiple rules to add or remove headers for the selected CDN Resource.

You can configure Custom Header in the [Medianova Control Panel](https://cloud.medianova.com) or via the [API](https://clients.medianova.com/api-documentation/performance-cdn/headers#put-api-v1-cdn-organization_uuid-resource-resource_uuid-1).

## Configure Custom Header

{% stepper %}
{% step %}

### Open Custom Header

Open your CDN Resource and select **Headers**.

<figure><img src="https://542970813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtK7oIwmhUHdEJcaH4Hx8%2Fuploads%2Fnob1RPuxZG1RvYanjATF%2Fimage.png?alt=media&amp;token=2b9fbc30-472f-477e-a9d7-36b14744eba6" alt=""><figcaption></figcaption></figure>

Locate the **Custom Header** section.
{% endstep %}

{% step %}

### Enable Custom Header

Enable **Custom Header**.
{% endstep %}

{% step %}

### Add a Header Rule

Add a rule and select the required header action.

Available actions include:

* **Add Origin Request Header** — Adds a header to the request sent from the CDN to the origin.
* **Add CDN Response Header** — Adds a header to the response delivered from the CDN to the client.
* **Remove CDN Response Header** — Removes a header before the CDN response is delivered to the client.
* **Remove Origin Request Header** — Removes a header before the request is forwarded to the origin.
* **Raw Header** — Defines a custom header directive when the standard header actions do not meet the required configuration.

Enter the header **Key** and **Value** when required by the selected action.

Repeat this step to configure additional header rules.
{% endstep %}

{% step %}

### Save the Configuration

Click **Save** in the pending changes bar.

Review the pending changes and confirm the update.
{% endstep %}
{% endstepper %}

## Header Processing

Custom Header rules can operate at different stages of the CDN request and response flow:

| Action                           | Applied To            | Behavior                                                                     |
| -------------------------------- | --------------------- | ---------------------------------------------------------------------------- |
| **Add Origin Request Header**    | CDN → Origin request  | Adds the configured header before the request is sent to the origin.         |
| **Remove Origin Request Header** | CDN → Origin request  | Removes the specified header before the request is sent to the origin.       |
| **Add CDN Response Header**      | CDN → Client response | Adds the configured header before the response is delivered to the client.   |
| **Remove CDN Response Header**   | CDN → Client response | Removes the specified header before the response is delivered to the client. |
| **Raw Header**                   | Custom                | Applies the configured raw header directive.                                 |

{% hint style="warning" %}
Header changes can affect origin authentication, caching, CORS behavior, and other HTTP processing. Verify the effect of a rule before applying it to production traffic.
{% endhint %}

Use **Raw Header** only when the required behavior cannot be configured with the standard request or response header actions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/headers/custom-header.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
