import type { NextConfig } from "next"; const nextConfig: NextConfig = { // Enable standalone output for Docker deployment output: "standalone", // Compress responses for better performance compress: true, // Optimize images images: { formats: ["image/avif", "image/webp"], minimumCacheTTL: 60 * 60 * 24 * 365, // 1 year }, // Security and performance headers async headers() { return [ { source: "/(.*)", headers: [ { key: "X-Content-Type-Options", value: "nosniff", }, { key: "X-Frame-Options", value: "DENY", }, { key: "X-XSS-Protection", value: "1; mode=block", }, { key: "Referrer-Policy", value: "strict-origin-when-cross-origin", }, { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()", }, ], }, { source: "/icons/(.*)", headers: [ { key: "Cache-Control", value: "public, max-age=31536000, immutable", }, ], }, { source: "/icon.svg", headers: [ { key: "Cache-Control", value: "public, max-age=31536000, immutable", }, ], }, ]; }, }; export default nextConfig;