# X-CDN Header

The X-CDN Header feature adds an `X-CDN` header to requests that are forwarded from the CDN to your origin. This allows your origin to identify that the request is coming through Medianova CDN, which can be useful for logging, routing decisions, and origin-side analytics.

{% hint style="info" %}
This feature does not modify the response returned to the viewer and does not affect caching or delivery logic.
{% endhint %}

### How X-CDN Header Works

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

When the X-CDN Header toggle is enabled:

* The CDN adds the `X-CDN` header to the **origin request** during the fetch operation.
* Your origin receives every request with this header included.
* The header allows your origin to distinguish CDN-proxied traffic from direct client traffic.
* The behavior applies to all request types because insertion occurs before the origin fetch.

This feature is passive and does not alter cache decisions, TTL behavior, Page Rules, or viewer-facing responses.

<figure><img src="https://542970813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtK7oIwmhUHdEJcaH4Hx8%2Fuploads%2F03xVXfdJKRYU6df1Z6Dw%2FEkran%20Resmi%202024-12-17%2012.24.26.png?alt=media&#x26;token=672afed2-f014-4443-818b-fbfb2ba61718" alt=""><figcaption><p>X-CDN Header configuration area inside the Headers tab</p></figcaption></figure>

## Use Cases

#### Origin-side analytics

Log whether a request came through the CDN layer by checking for the `X-CDN` header.

#### Conditional behavior at the origin

Apply specific logic (e.g., rate limits, routing decisions, request tagging) based on the presence of this header.

#### Debugging origin fetches

Verify that requests are reaching your origin through the CDN, especially when diagnosing caching or routing flows.

### Notes

* The header is inserted only on the origin request.
* It is not visible to clients and does not appear in viewer-facing responses.
* Header values may differ based on internal CDN configuration.
* Enabling the header does not change caching rules, request normalization, or delivery performance.
