1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-25 20:09:18 +02:00

fix(web): handle trailing slash in external domain (#6253)

This commit is contained in:
Daniel Dietzler
2024-01-09 06:06:02 +01:00
committed by GitHub
parent 29b204de57
commit 8d0a619e81

View File

@@ -20,7 +20,8 @@ export const copyToClipboard = async (secret: string) => {
};
export const makeSharedLinkUrl = (externalDomain: string, key: string) => {
return `${externalDomain || window.location.origin}/share/${key}`;
const url = externalDomain || window.location.origin;
return `${url + url.endsWith('/') ? '' : '/'}share/${key}`;
};
export const oauth = {