/** @type {import('next').NextConfig} */ const nextConfig = { output: "standalone", async headers() { const csp = [ "default-src 'self'", "script-src 'self' 'unsafe-inline' 'unsafe-eval'", "style-src 'self' 'unsafe-inline'", "img-src 'self' data: blob:", "font-src 'self' data:", "connect-src 'self'", "frame-ancestors 'none'", "base-uri 'self'", "form-action 'self'" ].join("; "); const headers = [ { key: "Content-Security-Policy", value: csp }, { key: "X-Frame-Options", value: "DENY" }, { key: "X-Content-Type-Options", value: "nosniff" }, { key: "Referrer-Policy", value: "strict-origin-when-cross-origin" }, { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=(), payment=()" } ]; if (process.env.NODE_ENV === "production") { headers.push({ key: "Strict-Transport-Security", value: "max-age=31536000; includeSubDomains" }); } return [ { source: "/(.*)", headers } ]; } }; export default nextConfig;