1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +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
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 = {