Skip to content

Commit b229639

Browse files
committed
fix: security headers
1 parent 346d290 commit b229639

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

apps/dashboard/next.config.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,38 @@ const nextConfig: NextConfig = {
1212
output: "standalone",
1313
};
1414

15+
export function headers() {
16+
return [
17+
{
18+
source: "/((?!demo).*)",
19+
headers: [
20+
{
21+
key: "Strict-Transport-Security",
22+
value: "max-age=31536000; includeSubDomains; preload",
23+
},
24+
{
25+
key: "X-Content-Type-Options",
26+
value: "nosniff",
27+
},
28+
{
29+
key: "Referrer-Policy",
30+
value: "strict-origin-when-cross-origin",
31+
},
32+
{
33+
key: "Permissions-Policy",
34+
value: "camera=(), microphone=(), geolocation=()",
35+
},
36+
{
37+
key: "X-Frame-Options",
38+
value: "DENY",
39+
},
40+
{
41+
key: "Content-Security-Policy",
42+
value: "frame-ancestors 'none'",
43+
},
44+
],
45+
},
46+
];
47+
}
48+
1549
export default nextConfig;

0 commit comments

Comments
 (0)