> 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/x-xss-protection.md).

# X-XSS Protection

Learn how the X-XSS Protection header controls browser-side filtering of reflected Cross-Site Scripting (XSS) attacks.

**X-XSS-Protection** adds the `X-XSS-Protection` header to viewer-facing responses. Browsers that support this header use their built-in XSS filtering mechanisms to detect and block certain reflected XSS attacks.

Modern browsers generally rely on `Content-Security-Policy` instead of this header. X-XSS-Protection is primarily intended for environments that require legacy browser compatibility.

You can configure X-XSS-Protection 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-6).

{% hint style="info" %}
X-XSS-Protection is a legacy browser security mechanism. It does not replace modern protections such as Content Security Policy (CSP).
{% endhint %}

## Configure X-XSS-Protection

{% stepper %}
{% step %}

### Open X-XSS-Protection

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%2FJs88HacQVoathWuisbhF%2Fimage.png?alt=media&amp;token=09c7f2c2-a34b-4eef-8e60-f02dc973a05b" alt=""><figcaption></figcaption></figure>

Locate the **X-XSS-Protection** section.
{% endstep %}

{% step %}

### Enable X-XSS-Protection

Enable **X-XSS-Protection**.

When enabled, the CDN adds the following header to viewer-facing responses:

```http
X-XSS-Protection: 1; mode=block
```

{% endstep %}

{% step %}

### Save the Configuration

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

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

## Behavior

When X-XSS-Protection is enabled:

* The CDN adds `X-XSS-Protection: 1; mode=block` to viewer-facing responses.
* Browsers that support the header can block pages that trigger reflected XSS heuristics.
* Modern browsers may ignore this header and rely on `Content-Security-Policy` for XSS mitigation.
* The header does not protect against stored or DOM-based XSS attacks.
* The setting does not affect origin requests or CDN caching behavior.

When X-XSS-Protection is disabled, the CDN does not add this header through this feature.


---

# 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/x-xss-protection.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.
