import { NextRequest, NextResponse } from "next/server"; import { apiCspSource } from "@/lib/api-base"; import { API_REFERENCE_STYLE_HASHES } from "@/lib/api-reference-csp"; import { basemapOrigins } from "@/lib/basemap"; import { runtimeConfig } from "@/lib/runtime-config"; // Nonce-based, strict Content-Security-Policy. This is computed fresh per // request (the nonce must never be reused/predictable) and threaded through // to Server Components via the `x-nonce` request header, so // `app/layout.tsx` can hand it to anything that legitimately needs to // render an inline