From 87bdc9aefa100f9dc645d67018f1e3e08d406850 Mon Sep 17 00:00:00 2001 From: Enno Gelhaus Date: Thu, 18 Sep 2025 14:12:31 +0200 Subject: [PATCH] Move header config to nextConfig --- apps/frontend/next.config.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/apps/frontend/next.config.js b/apps/frontend/next.config.js index b7769d70..f0f895bf 100644 --- a/apps/frontend/next.config.js +++ b/apps/frontend/next.config.js @@ -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", - }, ], - }, ]; - }, });