From bfeb8f6cb3eb5d514271881fc9cd39a9ae184737 Mon Sep 17 00:00:00 2001 From: Vivek Date: Thu, 23 Jul 2026 01:13:36 +0530 Subject: [PATCH 1/2] docs: explain the CSP nonce model across client-router soft navigations Add a 'CSP and the client router' subsection to the security docs page and a paragraph to the built-ins reference: enforcement is the HTTP header (not a meta http-equiv tag), the meta name=csp-nonce is a client-side carrier, and on a soft navigation the original page-load nonce stays authoritative and is re-stamped onto every dynamically-inserted script/preload (#1049/#1052). Gives users setting up strict CSP the why behind the model. --- .agents/skills/webjs/references/built-ins.md | 2 ++ docs/app/docs/security/page.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.agents/skills/webjs/references/built-ins.md b/.agents/skills/webjs/references/built-ins.md index af13ea36a..58f554afb 100644 --- a/.agents/skills/webjs/references/built-ins.md +++ b/.agents/skills/webjs/references/built-ins.md @@ -136,6 +136,8 @@ On by default (`X-Content-Type-Options: nosniff`, `X-Frame-Options: SAMEORIGIN`, Off by default. `{ "webjs": { "csp": true } }` enables a strict-dynamic + per-request nonce posture. An object form merges `directives` and supports `reportOnly`. Read the nonce with `cspNonce()` from `@webjsdev/core` to stamp your own inline `