From 43adf79a509ef8d31643a199585cf73d8be3115f Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Tue, 20 Feb 2024 17:21:01 +0100 Subject: [PATCH] fix config --- next.config.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/next.config.js b/next.config.js index cd0b54769add6..61c78820fb04e 100644 --- a/next.config.js +++ b/next.config.js @@ -5,12 +5,14 @@ const isProd = process.env.NODE_ENV === 'production' && !process.env.IS_PREVIEW; /** @type {import('next').NextConfig} */ const nextConfig = { - headers: [ - { - source: '/_next/static/([^/]+/pages|chunks|runtime|css|fonts|media)/(.+)', - headers: [{key: 'Access-Control-Allow-Origin', value: '*'}], - }, - ], + headers() { + return [ + { + source: '/_next/static/([^/]+/pages|chunks|runtime|css|fonts|media)/(.+)', + headers: [{key: 'Access-Control-Allow-Origin', value: '*'}], + }, + ]; + }, publicRuntimeConfig: { assetPrefix: isProd ? 'https://docs.sentry.io' : undefined, },