From 0fe74544c9c5a240aa791884a088fd7cb76ea5e6 Mon Sep 17 00:00:00 2001 From: Charles Garrett Date: Wed, 10 Jan 2024 14:45:29 -0500 Subject: [PATCH] chore: specifies a referrer policy to capture same-origin referrer & removes a unnecessary header --- next.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/next.config.js b/next.config.js index e92559b96..db6868512 100644 --- a/next.config.js +++ b/next.config.js @@ -1,5 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + poweredByHeader: false, compiler: { styledComponents: true }, reactStrictMode: true, redirects: async () => { @@ -58,6 +59,14 @@ const nextConfig = { destination: 'https://near.dataplane.rudderstack.com/:path*', } ], + headers: async () => [ + { + source: '/:path*', + headers: [{ + key: 'Referrer-Policy', + value: 'strict-origin-when-cross-origin,same-origin' + }] + }] }; module.exports = nextConfig;