import type { NextConfig } from "next"; const nextConfig: NextConfig = { poweredByHeader: false, // Minimaler Node-Server fuer das Docker-Image (siehe Dockerfile). output: "standalone", images: { formats: ["image/avif", "image/webp"], qualities: [75, 85], // Feste Bilder (Unterkunft, Team) liegen in public/images/, austauschbare // im persistenten Medienverzeichnis unter /media/… (src/app/media/[...path]/route.ts). localPatterns: [{ pathname: "/media/**" }, { pathname: "/images/**" }], dangerouslyAllowSVG: false, }, // Turbopack-Dateicaches kollidieren im OneDrive-synchronisierten // Arbeitsverzeichnis mit der Cloud-Synchronisierung (Erfahrung aus dem // Nachbarprojekt Wabenhain). Im Container spielt das keine Rolle. experimental: { turbopackFileSystemCacheForDev: false, turbopackFileSystemCacheForBuild: false, }, async headers() { // Die Content-Security-Policy setzt src/proxy.ts pro Request mit Nonce. return [ { source: "/(.*)", headers: [ { 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: "camera=(), microphone=(), geolocation=(), payment=()" }, { key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains" }, ], }, { // Statusseiten enthalten ein Zugangstoken in der URL: nie als // Referrer weitergeben, nie indexieren, nie cachen. source: "/buchung/:path*", headers: [ { key: "Referrer-Policy", value: "no-referrer" }, { key: "X-Robots-Tag", value: "noindex, nofollow" }, { key: "Cache-Control", value: "no-store" }, ], }, { source: "/admin/:path*", headers: [ { key: "X-Robots-Tag", value: "noindex, nofollow" }, { key: "Cache-Control", value: "no-store" }, ], }, ]; }, }; export default nextConfig;