fix(tracker): Remove domain name when parsing url

This commit is contained in:
Cedric 2024-04-15 23:25:15 +02:00
parent be7f69fd5d
commit bd360207a6

View File

@ -52,6 +52,12 @@
};
const parseURL = url => {
try {
const { pathname, search } = new URL(url);
url = pathname + search;
} catch {
/* empty */
}
return excludeSearch ? url.split('?')[0] : url;
};