From c9dcfbc5ffb5b5973e13167c6416931231c0d1b0 Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 5 Sep 2024 13:54:44 +0200 Subject: [PATCH] fix csp when default color mode is dark --- nextjs/csp/policies/app.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nextjs/csp/policies/app.ts b/nextjs/csp/policies/app.ts index cadb26363e..de6feff4f8 100644 --- a/nextjs/csp/policies/app.ts +++ b/nextjs/csp/policies/app.ts @@ -72,8 +72,9 @@ export function app(): CspDev.DirectiveDescriptor { // https://github.com/vercel/next.js/issues/14221#issuecomment-657258278 config.app.isDev ? KEY_WORDS.UNSAFE_EVAL : '', - // hash of ColorModeScript + // hash of ColorModeScript: system + dark '\'sha256-e7MRMmTzLsLQvIy1iizO1lXf7VWYoQ6ysj5fuUzvRwE=\'', + '\'sha256-9A7qFFHmxdWjZMQmfzYD2XWaNHLu1ZmQB0Ds4Go764k=\'', ], 'style-src': [