fix: broken analytics

This commit is contained in:
Kim, Jimin 2024-09-10 10:43:58 +09:00
parent 2cfa1d7a7d
commit 8be3ae370f
Signed by: pomp
GPG key ID: 2B516173EDD492EB
2 changed files with 8 additions and 10 deletions

8
apps/main/vercel.json Normal file
View file

@ -0,0 +1,8 @@
{
"rewrites": [
{
"source": "/stats/:match*",
"destination": "https://umami.developomp.com/:match*"
}
]
}

View file

@ -11,15 +11,5 @@ export default defineConfig({
},
server: {
open: true,
proxy: {
// https://umami.is/docs/guides/bypass-ad-blockers
// https://vitejs.dev/config/server-options.html#server-proxy
// https://developomp.com/stats/* -> https://umami.developomp.com/*
"^/stats/.*": {
target: "https://umami.developomp.com/",
changeOrigin: true,
rewrite: (path) => path.slice(6), // slice "/stats" off the string (which is 6 characters long)
},
},
},
})