Move header config to nextConfig

This commit is contained in:
Enno Gelhaus 2025-09-18 14:12:31 +02:00 committed by GitHub
parent 51a5608f6c
commit 87bdc9aefa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 11 deletions

View File

@ -6,6 +6,16 @@ const nextConfig = {
experimental: {
proxyTimeout: 90_000,
},
// Document-Policy header for browser profiling
async headers() {
return [{
source: "/:path*",
headers: [{
key: "Document-Policy",
value: "js-profiling",
}, ],
}, ];
},
reactStrictMode: false,
transpilePackages: ['crypto-hash'],
// Enable production sourcemaps for Sentry
@ -105,15 +115,4 @@ export default withSentryConfig(nextConfig, {
// Don't fail the build if Sentry upload fails in monorepo context
return;
},
// Document-Policy header for browser profiling
async headers() {
return [{
source: "/:path*",
headers: [{
key: "Document-Policy",
value: "js-profiling",
}, ],
}, ];
},
});