import { NextResponse } from 'next/server'; import type { NextRequest } from 'next/server'; export function middleware(request: NextRequest) { const nonce = Buffer.from(crypto.randomUUID()).toString('base64'); // Define CSP directives const cspDirectives = [ "default-src 'self'", // No 'unsafe-inline' fallback: CSP3 browsers ignore it next to a nonce, but // CSP2-only browsers ignore 'strict-dynamic' and would honour it — making // the fallback strictly worse than having none. There are no inline //