diff --git a/ocis-phoenix/pkg/service/v0/service.go b/ocis-phoenix/pkg/service/v0/service.go index 1f426af338..eea57c84a2 100644 --- a/ocis-phoenix/pkg/service/v0/service.go +++ b/ocis-phoenix/pkg/service/v0/service.go @@ -169,7 +169,7 @@ func (p Phoenix) Static(ttl int) http.HandlerFunc { return } - w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%s", strconv.Itoa(ttl))) + w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%s, must-revalidate", strconv.Itoa(ttl))) w.Header().Set("Expires", expires) w.Header().Set("Last-Modified", lastModified) diff --git a/ocis-pkg/middleware/static.go b/ocis-pkg/middleware/static.go index 03d61ac0fe..d601a3eb7a 100644 --- a/ocis-pkg/middleware/static.go +++ b/ocis-pkg/middleware/static.go @@ -31,7 +31,7 @@ func Static(root string, fs http.FileSystem, ttl int) func(http.Handler) http.Ha if strings.HasPrefix(r.URL.Path, path.Join(root, "api")) { next.ServeHTTP(w, r) } else { - w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%s", strconv.Itoa(ttl))) + w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%s, must-revalidate", strconv.Itoa(ttl))) w.Header().Set("Expires", expires) w.Header().Set("Last-Modified", lastModified) static.ServeHTTP(w, r)