diff --git a/.changeset/orange-books-check.md b/.changeset/orange-books-check.md new file mode 100644 index 000000000000..b8f90d4c1080 --- /dev/null +++ b/.changeset/orange-books-check.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes wrong contents in CSP meta tag. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7abb53acb95a..cdd99b1c28d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: build: name: "Build: ${{ matrix.os }}" runs-on: ${{ matrix.os }} - timeout-minutes: 3 + timeout-minutes: 5 strategy: matrix: OS: [ubuntu-latest, windows-latest] diff --git a/packages/astro/src/runtime/server/render/csp.ts b/packages/astro/src/runtime/server/render/csp.ts index 98696aed8361..2ea3ba0fc441 100644 --- a/packages/astro/src/runtime/server/render/csp.ts +++ b/packages/astro/src/runtime/server/render/csp.ts @@ -36,7 +36,7 @@ export function renderCspContent(result: SSRResult): string { } const strictDynamic = result.isStrictDynamic ? ` strict-dynamic` : ''; - const scriptSrc = `style-src ${styleResources} ${Array.from(finalStyleHashes).join(' ')}${strictDynamic};`; - const styleSrc = `script-src ${scriptResources} ${Array.from(finalScriptHashes).join(' ')};`; + const scriptSrc = `script-src ${scriptResources} ${Array.from(finalScriptHashes).join(' ')}${strictDynamic};`; + const styleSrc = `style-src ${styleResources} ${Array.from(finalStyleHashes).join(' ')};`; return `${directives} ${scriptSrc} ${styleSrc}`; }