From 9df43553ff6bf027d3fe9cc4beb9aa61daf7325f Mon Sep 17 00:00:00 2001 From: Chiwetelu Johnpaul Chidera <49923152+Myestery@users.noreply.github.com> Date: Tue, 2 Jul 2024 21:54:47 +0000 Subject: [PATCH] use nextjs headers to implement caching (#3419) --- packages/web/next.config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/web/next.config.js b/packages/web/next.config.js index d5df02dad9..8e3af0d46a 100644 --- a/packages/web/next.config.js +++ b/packages/web/next.config.js @@ -9,6 +9,19 @@ const config = { images: { domains: ["app.osmosis.zone", "raw.githubusercontent.com", "pbs.twimg.com"], }, + async headers() { + return [ + { + source: "/favicon.ico", + headers: [ + { + key: "Cache-Control", + value: "public, max-age=864000", // Cache for 10 days + }, + ], + }, + ]; + }, webpack(config) { /** * Add sprite.svg to bundle and append hash to revalidate cache when content changes.