mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 19:49:16 +00:00
Add support for custom base path to URL generator
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user