feat(config): add security headers to enhance application security

This commit is contained in:
Mauricio Siu
2026-01-21 18:52:57 +01:00
parent 733f4c4a23
commit 37e817ff26
+26
View File
@@ -19,6 +19,32 @@ const nextConfig = {
locales: ["en"],
defaultLocale: "en",
},
async headers() {
return [
{
// Apply security headers to all routes
source: "/:path*",
headers: [
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "Content-Security-Policy",
value: "frame-ancestors 'none'",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
],
},
];
},
};
export default nextConfig;