mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
app/vmselect: follow-up for 348c1bcec0
: cache static contents served from /select/tenantID/prometheus/vmui/static/...
This commit is contained in:
parent
a6ad9208ef
commit
8642418e5a
@ -366,7 +366,7 @@ func selectHandler(qt *querytracer.Tracer, startTime time.Time, w http.ResponseW
|
|||||||
}
|
}
|
||||||
if strings.HasPrefix(p.Suffix, "vmui/") || strings.HasPrefix(p.Suffix, "prometheus/vmui/") {
|
if strings.HasPrefix(p.Suffix, "vmui/") || strings.HasPrefix(p.Suffix, "prometheus/vmui/") {
|
||||||
// vmui access.
|
// vmui access.
|
||||||
if strings.HasPrefix(p.Suffix, "vmui/static/") {
|
if strings.HasPrefix(p.Suffix, "vmui/static/") || strings.HasPrefix(p.Suffix, "prometheus/vmui/static/") {
|
||||||
// Allow clients caching static contents for long period of time, since it shouldn't change over time.
|
// Allow clients caching static contents for long period of time, since it shouldn't change over time.
|
||||||
// Path to static contents (such as js and css) must be changed whenever its contents is changed.
|
// Path to static contents (such as js and css) must be changed whenever its contents is changed.
|
||||||
// See https://developer.chrome.com/docs/lighthouse/performance/uses-long-cache-ttl/
|
// See https://developer.chrome.com/docs/lighthouse/performance/uses-long-cache-ttl/
|
||||||
|
Loading…
Reference in New Issue
Block a user