Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/content/docs/en/reference/experimental-flags/csp.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Experimental Content Security Policy
title: Experimental Content Security Policy (CSP)
sidebar:
label: Content Security Policy
i18nReady: true
Expand All @@ -21,7 +21,7 @@ Enables support for [Content Security Policy (CSP)](https://developer.mozilla.or

Enabling this feature adds additional security to **Astro's handling of processed and bundled scripts and styles** by default, and allows you to further configure these, and additional, content types.

This experimental CSP feature has some limitations. Inline scripts are not supported out of the box, but you can [provide your own hashes](#hashes) for external and inline scripts. Additionally, [Astro's view transitions](/en/guides/view-transitions/) using the `<ClientRouter />` are not yet fully supported: when navigating from one page to another, some styles may not be applied and some scripts may not be executed.
This experimental CSP feature has some limitations. Inline scripts are not supported out of the box, but you can [provide your own hashes](#hashes) for external and inline scripts. [Astro's view transitions](/en/guides/view-transitions/) using the `<ClientRouter />` are not supported, but you can [consider migrating to the browser native View Transition API](https://events-3bg.pages.dev/jotter/astro-view-transitions/) instead if you are not using Astro's enhancements to the native View Transitions and Navigation APIs.

:::note
Due to the nature of the Vite dev server, this feature isn't supported while working in `dev` mode. Instead, you can test this in your Astro project using `build` and `preview`.
Expand Down