mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Allow alternate host url in tracker.
This commit is contained in:
parent
aec012fb79
commit
cebd3fd924
3 changed files with 9 additions and 5 deletions
|
|
@ -1,11 +1,11 @@
|
|||
export function removeTrailingSlash(url) {
|
||||
return url.length > 1 && url.endsWith('/') ? url.slice(0, -1) : url;
|
||||
return url && url.length > 1 && url.endsWith('/') ? url.slice(0, -1) : url;
|
||||
}
|
||||
|
||||
export function getDomainName(str) {
|
||||
try {
|
||||
return new URL(str).hostname;
|
||||
} catch {
|
||||
} catch (e) {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue