Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Implement Cache-Control header for umami.js

Frans Allencc612cb831b8
diff --git a/next.config.js b/next.config.js
index c1e31d7b9..e386c04e6 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
+ },
+ ],
+ },
+ ]
+ },
};