mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 09:35:36 +01:00
fix(tracker): Remove domain name when parsing url
This commit is contained in:
parent
be7f69fd5d
commit
bd360207a6
1 changed files with 6 additions and 0 deletions
|
|
@ -52,6 +52,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const parseURL = url => {
|
const parseURL = url => {
|
||||||
|
try {
|
||||||
|
const { pathname, search } = new URL(url);
|
||||||
|
url = pathname + search;
|
||||||
|
} catch {
|
||||||
|
/* empty */
|
||||||
|
}
|
||||||
return excludeSearch ? url.split('?')[0] : url;
|
return excludeSearch ? url.split('?')[0] : url;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue