From 9265aa4dc1ad99d2225bc3d635d41c82a58bea5a Mon Sep 17 00:00:00 2001 From: neodk2004 Date: Sat, 22 Aug 2026 14:39:53 +0200 Subject: [PATCH] fix(security): switch CSP to nonce + strict-dynamic (drop unsafe script-src sources) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mozilla Observatory's rescan flagged the enforced CSP as "implemented unsafely" (-20) for unsafe-inline/https:/http: in script-src. Enable Clerk's strict mode, which drops http:/https: and adds a per-request nonce + 'strict-dynamic' instead. Clerk forwards the resulting CSP header (with nonce) on both the response and the downstream request, which is exactly what Next.js's automatic nonce application reads during SSR, so framework scripts and page bundles are covered for free. next-themes' hand-written FOUC-prevention