🐛 Fix the Cache-Control max-age of redirected assets (#12758)

This commit is contained in:
𝐧𝐞𝐫𝐬 2026-11-01 19:26:14 +01:00 committed by GitHub
parent 723267cfdd
commit b0c1d9acda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -100,7 +100,7 @@
headers (cond-> {"location" (str url)
"x-host" (cond-> host port (str ":" port))
"x-mtype" (-> obj meta :content-type)
"cache-control" (str "max-age=" (inst-ms cch-max-age))}
"cache-control" (str "max-age=" (ct/seconds cch-max-age))}
(not public?)
(assoc "content-disposition" "attachment"))]
{::yres/status 307
@ -115,7 +115,7 @@
bucket (:bucket mdata)
headers (cond-> {"x-accel-redirect" (:path purl)
"content-type" (:content-type mdata)
"cache-control" (str "max-age=" (inst-ms cch-max-age))}
"cache-control" (str "max-age=" (ct/seconds cch-max-age))}
(not (public-bucket? bucket))
(assoc "content-disposition" "attachment"))]
{::yres/status 204