mirror of
https://github.com/penpot/penpot.git
synced 2026-09-18 18:06:14 +00:00
✨ Improve url resolution on assets handlers.
This commit is contained in:
parent
d68286821b
commit
340d1d43be
@ -65,12 +65,7 @@
|
|||||||
|
|
||||||
:fs
|
:fs
|
||||||
(let [purl (u/uri (:public-uri cfg))
|
(let [purl (u/uri (:public-uri cfg))
|
||||||
path (sto/object->path obj)
|
purl (u/join purl (sto/object->relative-path obj))]
|
||||||
purl (update purl :path
|
|
||||||
(fn [existing]
|
|
||||||
(if (str/ends-with? existing "/")
|
|
||||||
(str existing path)
|
|
||||||
(str existing "/" path))))]
|
|
||||||
{:status 204
|
{:status 204
|
||||||
:headers {"x-accel-redirect" (:path purl)
|
:headers {"x-accel-redirect" (:path purl)
|
||||||
"content-type" (:content-type mdata)
|
"content-type" (:content-type mdata)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user