mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 09:26:36 +02:00
✨ Improve url resolution on assets handlers.
This commit is contained in:
parent
d68286821b
commit
340d1d43be
1 changed files with 1 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue