mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 09:15:44 +03:00
fix: normalize external domain (#12831)
chore: normalize external domain
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user