Skip to content

Commit 7c6f733

Browse files
authored
fix: headers (#533)
1 parent eea70ed commit 7c6f733

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

next.config.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,22 @@ const nextConfig = {
3939
eslint: {
4040
// eslint will be executed before we run build
4141
ignoreDuringBuilds: true,
42-
}
42+
},
43+
poweredByHeader: false,
44+
headers: async () => {
45+
return [
46+
{
47+
source: '/:path*',
48+
headers: [
49+
{ key: 'Cache-Control', value: 'no-cache, no-store' },
50+
{ key: 'Content-Security-Policy', value: 'frame-ancestors \'none\'' },
51+
{ key: 'X-Content-Type-Options', value: 'nosniff' },
52+
{ key: 'X-Frame-Options', value: 'DENY' },
53+
{ key: 'Referrer-Policy', value: 'no-referrer' },
54+
],
55+
},
56+
];
57+
},
4358
};
4459

4560
module.exports = nextConfig;

0 commit comments

Comments
 (0)