Skip to content

Commit fa84e4c

Browse files
fix(headers): add security headers (#2350)
* fix(headers): add missing security headers * fix(headers): preserve geolocation access
1 parent e83ea86 commit fa84e4c

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

apps/web/next.config.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const monorepoRoot = resolve(import.meta.dirname, '../..');
2727
/** @type {import('next').NextConfig} */
2828
const nextConfig = {
2929
reactStrictMode: true,
30+
poweredByHeader: false,
3031

3132
// Both values MUST be set to the monorepo root and kept in sync.
3233
// `vercel build` sets NEXT_PRIVATE_OUTPUT_TRACE_ROOT to the project dir (apps/web)
@@ -138,6 +139,26 @@ const nextConfig = {
138139
key: 'Cross-Origin-Opener-Policy',
139140
value: 'same-origin',
140141
},
142+
{
143+
key: 'X-XSS-Protection',
144+
value: '0',
145+
},
146+
{
147+
key: 'Referrer-Policy',
148+
value: 'strict-origin-when-cross-origin',
149+
},
150+
{
151+
key: 'Permissions-Policy',
152+
value: 'geolocation=(self), camera=(), microphone=()',
153+
},
154+
{
155+
key: 'Cross-Origin-Resource-Policy',
156+
value: 'same-origin',
157+
},
158+
{
159+
key: 'Cross-Origin-Embedder-Policy-Report-Only',
160+
value: 'require-corp',
161+
},
141162
],
142163
},
143164
];

0 commit comments

Comments
 (0)