diff --git a/services/web-proxy/main.go b/services/web-proxy/main.go index e454a4c3..e305a2ec 100644 --- a/services/web-proxy/main.go +++ b/services/web-proxy/main.go @@ -111,7 +111,7 @@ func modifyDashResponse(resp *http.Response) error { (strings.HasSuffix(r.URL.Path, ".js") || strings.HasSuffix(r.URL.Path, ".css") || strings.HasSuffix(r.URL.Path, ".map")) if is_dash_static_asset && resp.StatusCode == 200 { - resp.Header.Add("Cache-Control", "max-age: 604800") + resp.Header.Add("Cache-Control", "max-age=31536000, s-maxage=31536000, immutable") } return logTimeElapsed(resp) diff --git a/services/web-proxy/util.go b/services/web-proxy/util.go index 780139e5..be001f2e 100644 --- a/services/web-proxy/util.go +++ b/services/web-proxy/util.go @@ -40,6 +40,8 @@ func cleanPath(host, path string) string { return "" } + path = strings.ToLower(path) + if !(strings.HasPrefix(path, "/v2") || strings.HasPrefix(path, "/private")) { return "" }