diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-08-03 10:55:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 10:55:21 +0200 |
commit | ac2dbb3513b2e6ff24624f30a2a8b1bd51bdabc5 (patch) | |
tree | b877de384a03ce1beb29d2887415c5e14621a6f0 /mediaapi | |
parent | df5d4dc7a36f7fe5ec17f9da81c535d5c01bd505 (diff) |
Add Cache-Control header to media endpoints (#2612)
* Add Cache-Control header
* Raise rate_limiting threshold to 20
Diffstat (limited to 'mediaapi')
-rw-r--r-- | mediaapi/routing/routing.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mediaapi/routing/routing.go b/mediaapi/routing/routing.go index 19690818..9dcfa955 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, |