fix(web-proxy): fix dashboard cache headers, force path lowercase in metrics
This commit is contained in:
parent
939a727969
commit
372eef72f4
@ -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)
|
||||
|
@ -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 ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user