diff --git a/.changeset/lovely-nights-stay.md b/.changeset/lovely-nights-stay.md new file mode 100644 index 000000000000..358cfc16cc7d --- /dev/null +++ b/.changeset/lovely-nights-stay.md @@ -0,0 +1,38 @@ +--- +'astro': minor +--- + +Adds support for the more specific CSP directives `script-src-elem`, `script-src-attr`, `style-src-elem`, and `style-src-attr` through a new `kind` option. + +Previously, [`CSP`](https://docs.astro.build/en/reference/configuration-reference/#securitycsp) was only scoped to generic `script-src`/`style-src` directives. Now each source or hash can be scoped to a narrower directive — for example, to allow inline `style` attributes (such as those from `define:vars` or Shiki) without loosening the policy for your `