From 900d5fc031d661a2bd5e709f82a79745a3c4e7cd Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Tue, 2 Aug 2022 17:39:32 +0200 Subject: [PATCH] Add Cache-Control header --- mediaapi/routing/routing.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mediaapi/routing/routing.go b/mediaapi/routing/routing.go index 196908184..9dcfa955f 100644 --- a/mediaapi/routing/routing.go +++ b/mediaapi/routing/routing.go @@ -149,6 +149,9 @@ func makeDownloadAPI( } } + // Cache media for at least one day. + w.Header().Set("Cache-Control", "public,max-age=86400,s-maxage=86400") + Download( w, req,