Skip to content

Commit 47acb36

Browse files
committed
chore: ensure propder CSP setup for dashboard and website
1 parent 917d6e1 commit 47acb36

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

apps/dashboard/next.config.mjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,23 @@ const nextConfig = {
8585
sassOptions: {
8686
includePaths: [path.join("src", "styles")],
8787
},
88+
async headers() {
89+
return [
90+
{
91+
source: '/(.*)',
92+
headers: [
93+
{
94+
key: 'X-Frame-Options',
95+
value: 'DENY',
96+
},
97+
{
98+
key: 'Content-Security-Policy',
99+
value: "frame-ancestors 'none';",
100+
},
101+
],
102+
},
103+
];
104+
},
88105
webpack: (config, { isServer, dev }) => {
89106
config.resolve.fallback = { fs: false, net: false, tls: false };
90107
config.externals.push("pino-pretty", "encoding");

apps/web/next.config.mjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,23 @@ const nextConfig = {
1313
sassOptions: {
1414
includePaths: [path.join("src", "styles")],
1515
},
16+
async headers() {
17+
return [
18+
{
19+
source: '/(.*)',
20+
headers: [
21+
{
22+
key: 'X-Frame-Options',
23+
value: 'DENY',
24+
},
25+
{
26+
key: 'Content-Security-Policy',
27+
value: "frame-ancestors 'none';",
28+
},
29+
],
30+
},
31+
];
32+
},
1633
webpack: (config) => {
1734
config.resolve.fallback = { fs: false, net: false, tls: false };
1835
config.externals.push("pino-pretty", "encoding");

0 commit comments

Comments
 (0)