lower Cache-Control max-age from 24h to 1h to increase speed of updates delivery

This commit is contained in:
Dmitry Verkhoturov
2020-01-18 17:58:58 -06:00
committed by Umputun
parent 540d828ea1
commit 0b55c4f7ad
+1 -1
View File
@@ -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+"/") {