Merge branch 'dev' of https://github.com/umami-software/umami into feat/add-segments

This commit is contained in:
Francis Cao 2025-06-11 06:46:31 -07:00
commit 1ccc8a1a86
16 changed files with 360 additions and 272 deletions

View file

@ -145,7 +145,8 @@ export async function POST(request: Request) {
const base = hostname ? `https://${hostname}` : 'https://localhost';
const currentUrl = new URL(url, base);
let urlPath = currentUrl.pathname === '/undefined' ? '' : currentUrl.pathname;
let urlPath =
currentUrl.pathname === '/undefined' ? '' : currentUrl.pathname + currentUrl.hash;
const urlQuery = currentUrl.search.substring(1);
const urlDomain = currentUrl.hostname.replace(/^www./, '');
@ -169,7 +170,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) {