mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
Remove trailing slash before appending hash
This commit is contained in:
parent
534bbb5b62
commit
19268c064a
1 changed files with 3 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ export async function POST(request: Request) {
|
|||
const base = hostname ? `https://${hostname}` : 'https://localhost';
|
||||
const currentUrl = new URL(url, base);
|
||||
|
||||
let urlPath = currentUrl.pathname + currentUrl.hash;
|
||||
let urlPath = currentUrl.pathname;
|
||||
const urlQuery = currentUrl.search.substring(1);
|
||||
const urlDomain = currentUrl.hostname.replace(/^www./, '');
|
||||
|
||||
|
|
@ -141,6 +141,8 @@ export async function POST(request: Request) {
|
|||
urlPath = urlPath.replace(/(.+)\/$/, '$1');
|
||||
}
|
||||
|
||||
urlPath = urlPath + currentUrl.hash;
|
||||
|
||||
let referrerPath: string;
|
||||
let referrerQuery: string;
|
||||
let referrerDomain: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue