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.

fix: fix remove trailing slash regex

Eritque arcus33110a44ec1c
diff --git a/src/app/api/send/route.ts b/src/app/api/send/route.ts
index 9d41a68f6..65c88a285 100644
--- a/src/app/api/send/route.ts
+++ b/src/app/api/send/route.ts
@@ -169,7 +169,7 @@ export async function POST(request: Request) {
const twclid = currentUrl.searchParams.get('twclid');
if (process.env.REMOVE_TRAILING_SLASH) {
- urlPath = urlPath.replace(/(.+)\/$/, '$1');
+ urlPath = urlPath.replace(/\/(?=(#.*)?$)/, '');
}
if (referrer) {