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.

Add rewrite for script in cloud mode.

Mike Caoa8e3b5efbc00
diff --git a/next.config.ts b/next.config.ts
index e4fe228cf..b2b1c18da 100644
--- a/next.config.ts
+++ b/next.config.ts
@@ -155,6 +155,13 @@ if (trackerScriptName) {
}
}
+if (cloudMode) {
+ rewrites.push({
+ source: '/script.js',
+ destination: 'https://cloud.umami.is/script.js',
+ });
+}
+
/** @type {import('next').NextConfig} */
export default {
reactStrictMode: false,