1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 = {