import createMiddleware from 'next-intl/middleware'; import type { NextRequest } from 'next/server'; import { routing } from './src/i18n/routing'; const intl = createMiddleware(routing); // React reconstructs server stacks with eval in development and never in production. const DEV = process.env.NODE_ENV === 'development'; /** * Security headers (SPEC.md section 14). Everything is served from one origin: the app * proxies `/api`, next/font self hosts the typeface and there is no third party script * anywhere, so the policy names `'self'` and stops. * * Scripts are allowed by nonce rather than by `'unsafe-inline'`. A fresh nonce per request * means an injected `