From cc612cb831b8f13df2686303de32a57dca45dff0 Mon Sep 17 00:00:00 2001 From: Frans Allen Date: Mon, 5 Oct 2020 14:45:24 +0700 Subject: [PATCH] Implement Cache-Control header for umami.js --- next.config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/next.config.js b/next.config.js index c1e31d7b..e386c04e 100644 --- a/next.config.js +++ b/next.config.js @@ -19,4 +19,17 @@ module.exports = { return config; }, + async headers() { + return [ + { + source: '/umami.js', + headers: [ + { + key: 'Cache-Control', + value: 'public, max-age=2592000', // 30 days + }, + ], + }, + ] + }, };