mirror of
https://github.com/stashapp/stash.git
synced 2025-12-15 21:03:22 +01:00
Fix sanitizeURL (#599)
This commit is contained in:
parent
bd5ee9ba6b
commit
ef8cba804f
1 changed files with 2 additions and 2 deletions
|
|
@ -119,11 +119,11 @@ const sanitiseURL = (url?: string, siteURL?: URL) => {
|
|||
if (siteURL) {
|
||||
// if url starts with the site host, then prepend the protocol
|
||||
if (url.startsWith(siteURL.host)) {
|
||||
return siteURL.protocol + url;
|
||||
return `${siteURL.protocol}//${url}`;
|
||||
}
|
||||
|
||||
// otherwise, construct the url from the protocol, host and passed url
|
||||
return `${siteURL.protocol}${siteURL.host}/${url}`;
|
||||
return `${siteURL.protocol}//${siteURL.host}/${url}`;
|
||||
}
|
||||
|
||||
// just prepend the protocol - assume https
|
||||
|
|
|
|||
Loading…
Reference in a new issue