Skip to content

Commit 81f71ca

Browse files
jsparkdevascorbic
andauthored
fix(astro): update wrong content in CSP meta tag (#13905)
* fix(astro): update wrong content in CSP meta tag * patch * Increase timeout --------- Co-authored-by: Matt Kane <[email protected]>
1 parent 37fa0a2 commit 81f71ca

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.changeset/orange-books-check.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Fixes wrong contents in CSP meta tag.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
build:
3535
name: "Build: ${{ matrix.os }}"
3636
runs-on: ${{ matrix.os }}
37-
timeout-minutes: 3
37+
timeout-minutes: 5
3838
strategy:
3939
matrix:
4040
OS: [ubuntu-latest, windows-latest]

packages/astro/src/runtime/server/render/csp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function renderCspContent(result: SSRResult): string {
3636
}
3737

3838
const strictDynamic = result.isStrictDynamic ? ` strict-dynamic` : '';
39-
const scriptSrc = `style-src ${styleResources} ${Array.from(finalStyleHashes).join(' ')}${strictDynamic};`;
40-
const styleSrc = `script-src ${scriptResources} ${Array.from(finalScriptHashes).join(' ')};`;
39+
const scriptSrc = `script-src ${scriptResources} ${Array.from(finalScriptHashes).join(' ')}${strictDynamic};`;
40+
const styleSrc = `style-src ${styleResources} ${Array.from(finalStyleHashes).join(' ')};`;
4141
return `${directives} ${scriptSrc} ${styleSrc}`;
4242
}

0 commit comments

Comments
 (0)