From d98265ad9d41d3e186d1fecd41a9e013e3e30208 Mon Sep 17 00:00:00 2001 From: pgjones Date: Tue, 26 May 2020 11:19:54 +0100 Subject: [PATCH] Allow scripts to contain a style CSP-nonce This follows on from e377515867e4011dbc92556e9361ebce6e24deba which introduced a script nonce. The same nonce is now used for the inline styles, allowing a stronger CSP (nonce over unsafe-inline). --- runtime/src/server/middleware/get_page_handler.ts | 8 ++++---- site/content/docs/12-security.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/runtime/src/server/middleware/get_page_handler.ts b/runtime/src/server/middleware/get_page_handler.ts index 53f413640..16a0768ba 100644 --- a/runtime/src/server/middleware/get_page_handler.ts +++ b/runtime/src/server/middleware/get_page_handler.ts @@ -292,6 +292,9 @@ export function get_page_handler( script += ``) diff --git a/site/content/docs/12-security.md b/site/content/docs/12-security.md index 036568162..088d39510 100644 --- a/site/content/docs/12-security.md +++ b/site/content/docs/12-security.md @@ -6,9 +6,9 @@ By default, Sapper does not add security headers to your app, but you may add th ### Content Security Policy (CSP) -Sapper generates inline `