import type { NextConfig } from "next"; const nextConfig: NextConfig = { output: "standalone", poweredByHeader: false, transpilePackages: [ "@album/contracts", "@album/database", "@album/email", "@album/storage", ], async headers() { const securityHeaders = [ { 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=(), geolocation=(), microphone=(), payment=()", }, ]; if (process.env.NODE_ENV === "production") { securityHeaders.push({ key: "Strict-Transport-Security", value: "max-age=31536000; includeSubDomains", }); } return [{ source: "/(.*)", headers: securityHeaders }]; }, }; export default nextConfig;