From 31f1810e5e65ee23f2a761aaffb8cec2b69bc5e7 Mon Sep 17 00:00:00 2001 From: David Valdez Date: Wed, 26 Apr 2023 04:41:08 +0000 Subject: [PATCH] Add support for custom base path to URL generator --- ui/src/components/photoGallery/ProtectedMedia.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/photoGallery/ProtectedMedia.tsx b/ui/src/components/photoGallery/ProtectedMedia.tsx index 305f16d6..326217da 100644 --- a/ui/src/components/photoGallery/ProtectedMedia.tsx +++ b/ui/src/components/photoGallery/ProtectedMedia.tsx @@ -13,7 +13,7 @@ const placeholder = const getProtectedUrl = (url?: string) => { if (url == undefined) return undefined - const imgUrl = new URL(url, location.origin) + const imgUrl = new URL(`${import.meta.env.BASE_URL}/${url}`, location.origin) const tokenRegex = location.pathname.match(/^\/share\/([\d\w]+)(\/?.*)$/) if (tokenRegex) {