From 0b55c4f7adf350be8117990be120262e3244f2bd Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Sun, 19 Jan 2020 00:28:34 +0100 Subject: [PATCH] lower Cache-Control max-age from 24h to 1h to increase speed of updates delivery --- backend/app/rest/api/rest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/rest/api/rest.go b/backend/app/rest/api/rest.go index 5dbec418..c5939729 100644 --- a/backend/app/rest/api/rest.go +++ b/backend/app/rest/api/rest.go @@ -469,7 +469,7 @@ func addFileServer(r chi.Router, path string, root http.FileSystem, version stri r.With(tollbooth_chi.LimitHandler(tollbooth.NewLimiter(20, nil)), middleware.Timeout(10*time.Second), - cacheControl(time.Hour*24, version), + cacheControl(time.Hour, version), ).Get(path, func(w http.ResponseWriter, r *http.Request) { // don't show dirs, just serve files if strings.HasSuffix(r.URL.Path, "/") && len(r.URL.Path) > 1 && r.URL.Path != (origPath+"/") {