fix(web): render public pages under nonce CSP

This commit is contained in:
Marc-André Bombeck committed 2026-07-29 16:46:19 +02:00
1 parent aaa51fb494
commit 1682c3b54d
3 files changed
+52 -42

No files matched your search

+6 -2
View File
@@ -28,8 +28,12 @@ import Link from "next/link";
* `#credits` still clear the sticky header on iPhones with a notch.
*/
export const dynamic = "force-static";
export const revalidate = false;
// The edge CSP carries a fresh nonce on every response. Rendering this route
// statically would freeze Next's inline streaming scripts without that
// request nonce, so the browser would reject them and leave only the root
// Suspense fallback visible. Keep the public page request-rendered instead of
// weakening the CSP with `unsafe-inline`.
export const dynamic = "force-dynamic";
const LAST_UPDATED = "2026-05-15";
+6 -7
View File
@@ -27,15 +27,14 @@ import Link from "next/link";
* `<AuthShell>` PUBLIC_PATHS so an unauthenticated visitor (or App-Store
* reviewer) lands directly on the content without an auth redirect.
*
* Static-rendered (`force-static`, no `revalidate`). The bilingual body
* is inlined verbatim instead of routed through the i18n provider so the
* page works without a client-side context — a legal document should
* never depend on JavaScript to display its non-default-locale text to a
* reviewer.
* The bilingual body is inlined verbatim instead of routed through the i18n
* provider, so the legal text itself never depends on client-side locale
* state. The route is request-rendered because the edge CSP carries a fresh
* nonce: a static document would freeze Next's inline streaming scripts
* without that request nonce and strand visitors on the Suspense fallback.
*/
export const dynamic = "force-static";
export const revalidate = false;
export const dynamic = "force-dynamic";
const POLICY_VERSION = "1.4.40";
const LAST_UPDATED = "2026-05-18";