Add security headers

This commit is contained in:
austinkelsay 2024-10-01 18:00:59 -05:00
parent a8c9ab7f68
commit 0eecb9a23b

View File

@ -31,7 +31,7 @@ module.exports = removeImports({
headers: [
{
key: "Access-Control-Allow-Origin",
value: "https://plebdevs-three.vercel.app", // Set your origin
value: process.env.BACKEND_URL
},
{
key: "Access-Control-Allow-Methods",
@ -41,6 +41,26 @@ module.exports = removeImports({
key: "Access-Control-Allow-Headers",
value: "Content-Type, Authorization",
},
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
{
key: "Content-Security-Policy",
value: "default-src 'self'; frame-ancestors 'none';",
},
{
key: "Strict-Transport-Security",
value: "max-age=31536000; includeSubDomains; preload"
},
],
},
];