Merge pull request #3500 from Dokploy/security/fix-frame-hijacking

feat(config): add security headers to enhance application security
This commit is contained in:
Mauricio Siu
2026-01-21 11:53:37 -06:00
committed by GitHub
+26
View File
@@ -19,6 +19,32 @@ const nextConfig = {
locales: ["en"], locales: ["en"],
defaultLocale: "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; export default nextConfig;