From 199e24a006ab4b01026bc331bb2e08d3f9067dc2 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Sat, 14 Oct 2023 16:54:41 +0200 Subject: [PATCH] Set new caching rules (#542) --- next.config.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index f293ba9f..3915291a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - productionBrowserSourceMaps: true, reactStrictMode: true, images: { domains: [ @@ -26,6 +25,31 @@ const nextConfig = { }, ] }, + async headers() { + return [ + { + source: '/(.*)?', + headers: [ + { + key: 'Referrer-Policy', + value: 'origin-when-cross-origin', + }, + { + key: 'Pragma', + value: 'no-cache', + }, + { + key: 'Expires', + value: new Date().toString(), + }, + { + key: 'X-Content-Type-Options', + value: 'nosniff', + }, + ], + }, + ] + }, async rewrites() { return [ {