mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: normalize external domain (#12831)
chore: normalize external domain
This commit is contained in:
parent
9a4a320cfb
commit
a7719a94fc
3 changed files with 22 additions and 5 deletions
|
|
@ -257,11 +257,7 @@ export const copyToClipboard = async (secret: string) => {
|
|||
};
|
||||
|
||||
export const makeSharedLinkUrl = (externalDomain: string, key: string) => {
|
||||
let url = externalDomain || window.location.origin;
|
||||
if (!url.endsWith('/')) {
|
||||
url += '/';
|
||||
}
|
||||
return `${url}share/${key}`;
|
||||
return new URL(`share/${key}`, externalDomain || window.location.origin).href;
|
||||
};
|
||||
|
||||
export const oauth = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue