From b0c1d9acda1c14ff791512f765fccf6401a83873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=90=A7=F0=9D=90=9E=F0=9D=90=AB=F0=9D=90=AC?= Date: Sun, 1 Nov 2026 19:26:14 +0100 Subject: [PATCH] :bug: Fix the Cache-Control max-age of redirected assets (#12758) --- backend/src/app/http/assets.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/app/http/assets.clj b/backend/src/app/http/assets.clj index e75f599fdc..f09c694eb4 100644 --- a/backend/src/app/http/assets.clj +++ b/backend/src/app/http/assets.clj @@ -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