/** * Security-header policy — the SINGLE SOURCE OF TRUTH for the web app's * security headers (TASK-0134, OWASP ASVS L2 §7 / §9). * * Why here: the policy must be applied by `apps/web/next.config.mjs` (the * `headers()` API — a Node script that bundles Next's webpack toolchain * cannot import a bare `.ts` module through the bundler) AND asserted by * the security suite (`tests/security/headers.test.ts`). Both consumers * import this exact module, so the web headers and the test expectations * cannot drift. The API (`apps/api/src/main.ts`) serves JSON (CSP * `default-src 'none'`) and keeps its own small header block; the web is * the only surface that renders HTML to end users. * * The CSP is deliberately app-specific (documented per directive): * * - `default-src 'self'` — nothing from any other origin by default. * - `script-src 'self' 'unsafe-inline'` — `'self'` for the chunked static * JS; `'unsafe-inline'` is REQUIRED by Next.js 14 App Router: the SSR * flight payload is delivered as inline `