> 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/cors-header.md).

# CORS Header

Learn about the CORS Header and how to enable and configure this feature.

**CORS Header** allows CDN edge servers to add the `Access-Control-Allow-Origin` header to HTML responses based on the configured allowed origins.

By default, Medianova CDN forwards CORS headers received from your origin without modification. Enable this feature when the CDN needs to provide the `Access-Control-Allow-Origin` header.

You can configure CORS 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).

{% hint style="info" %}
If your origin already returns the required `Access-Control-Allow-Origin` header, you may not need to enable CORS Header. If both the origin and CDN set this header, the resulting behavior depends on your Header Override configuration.
{% endhint %}

## Configure CORS Header

{% stepper %}
{% step %}

### Open CORS 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%2FHXxlkXII3QViEPg3SIYZ%2Fimage.png?alt=media&amp;token=403ee60b-16f6-40cd-ac0b-81f7a94e780e" alt=""><figcaption></figcaption></figure>

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

{% step %}

### Enable CORS Header

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

{% step %}

### Configure Allowed Origins

Under **Allowed origins**, enter the origins that should be allowed to access the content.

You can enter multiple values on separate lines or separate them with commas.

Supported entries include specific origins and wildcard domains, for example:

```
https://example.com
*.example.com
```

Click **Add** to add the entered origins.

{% hint style="info" %}
If no origins are configured, the CDN returns:

`Access-Control-Allow-Origin: *`

This allows requests from any origin.
{% endhint %}
{% endstep %}

{% step %}

### Save the Configuration

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

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

## How CORS Header Works

When enabled, CDN edge servers add the `Access-Control-Allow-Origin` header to HTML responses according to the configured allowed origins.

The behavior depends on the configuration:

* **No allowed origins configured** — The CDN returns `Access-Control-Allow-Origin: *`.
* **Specific origins configured** — Cross-origin access is restricted according to the configured origins.
* **Wildcard domain configured** — Subdomains matching the configured wildcard entry are supported.

{% hint style="warning" %}
CORS Header applies to HTML responses only. Applications that require additional CORS headers, such as those used for credentials, methods, or custom request headers, may require additional configuration at the origin.
{% endhint %}


---

# 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/cors-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.
