Files
form/next.config.ts
Puechberty Arthur 1611ad7440 add form site
2026-03-02 13:38:13 +01:00

55 lines
1.3 KiB
TypeScript

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;