import type { NextConfig } from "next"; /** * Sicherheitskopfzeilen fuer alle Antworten. Die CSP selbst wird pro Anfrage in * src/proxy.ts mit einer Nonce gesetzt, weil sie dort dynamisch sein muss. */ const SICHERHEITS_KOPFZEILEN = [ { key: "X-Content-Type-Options", value: "nosniff" }, { key: "X-Frame-Options", value: "DENY" }, { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" }, { key: "Permissions-Policy", value: "geolocation=(), microphone=(), camera=(self)" }, { key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains" }, ]; const konfiguration: NextConfig = { // Fuer das schlanke Laufzeit-Abbild im Dockerfile und fuer die native Installation. output: "standalone", async headers() { return [{ source: "/:pfad*", headers: SICHERHEITS_KOPFZEILEN }]; }, }; export default konfiguration;