From bb4a281407c7f3814ed760a7d3fed8455a045a3a Mon Sep 17 00:00:00 2001 From: sijinhui Date: Wed, 17 Apr 2024 14:10:54 +0800 Subject: [PATCH] optimize --- next.config.mjs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/next.config.mjs b/next.config.mjs index 16c9aa933..bfaf2417b 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -106,6 +106,18 @@ const IndexHeaders = [ const ForceCacheHeaders = [ { key: "Cache-Control", value: "max-age=2592000, s-maxage=86400"} ] +const NoCacheHeaders = [ + { key: "Cache-Control", value: "no-cache"} +] + +nextConfig.headers = async () => { + return [ + { + source: '/', + headers: NoCacheHeaders, + } + ] +} if (mode !== "export") { // nextConfig.headers = async () => {