diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-01-27 18:09:48 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-01-27 18:09:48 +0100 |
commit | d27d8655bb8c7eb7b4aa894ed26d5ad6d18cde78 (patch) | |
tree | 65dafa4cdf1053cae48f1c907d421a08c1d97f23 | |
parent | 6d75ec60bf7f6efeb7b34f2731254280f9e25a63 (diff) | |
download | gallery-d27d8655bb8c7eb7b4aa894ed26d5ad6d18cde78.tar.gz gallery-d27d8655bb8c7eb7b4aa894ed26d5ad6d18cde78.tar.xz gallery-d27d8655bb8c7eb7b4aa894ed26d5ad6d18cde78.zip |
gallery: make it reverse proxy friendly
-rw-r--r-- | public/gallery.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/public/gallery.js b/public/gallery.js index decb197..73eb9ad 100644 --- a/public/gallery.js +++ b/public/gallery.js @@ -10,7 +10,7 @@ function call(method, params) { callActive++ return m.request({ method: "POST", - url: `/api/${method}`, + url: `api/${method}`, body: params, }).then(result => { callActive-- @@ -98,7 +98,7 @@ let Thumbnail = { if (!e.thumbW || !e.thumbH) return m('.thumbnail.missing', {...vnode.attrs, info: null}) return m('img.thumbnail', {...vnode.attrs, info: null, - src: `/thumb/${e.sha1}`, width: e.thumbW, height: e.thumbH, + src: `thumb/${e.sha1}`, width: e.thumbW, height: e.thumbH, loading}) }, } @@ -494,7 +494,7 @@ let View = { view(vnode) { const view = m('.view', [ ViewModel.sha1 !== undefined - ? m('img', {src: `/image/${ViewModel.sha1}`, + ? m('img', {src: `image/${ViewModel.sha1}`, width: ViewModel.width, height: ViewModel.height}) : "No image.", ]) |