import type { NextConfig } from "next"; const nextConfig: NextConfig = { // Optimisations de performance compress: true, poweredByHeader: false, // Headers de sécurité et SEO async headers() { return [ { source: "/(.*)", headers: [ { key: "X-Content-Type-Options", value: "nosniff", }, { key: "X-Frame-Options", value: "SAMEORIGIN", }, { key: "X-XSS-Protection", value: "1; mode=block", }, { key: "Referrer-Policy", value: "strict-origin-when-cross-origin", }, { key: "Permissions-Policy", value: "camera=(), microphone=(), geolocation=()", }, { key: "Strict-Transport-Security", value: "max-age=63072000; includeSubDomains; preload", }, ], }, { // Cache assets statiques longtemps source: "/(.*)\\.(ico|png|jpg|jpeg|gif|svg|webp|woff|woff2)", headers: [ { key: "Cache-Control", value: "public, max-age=31536000, immutable", }, ], }, ]; }, }; export default nextConfig;