From 8642418e5aa91fc4c963b2d5c0b00906eab7a723 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 16 Oct 2023 23:27:04 +0200 Subject: [PATCH] app/vmselect: follow-up for 348c1bcec04a99ddd02a3228027160e45aa9aa97: cache static contents served from /select/tenantID/prometheus/vmui/static/... --- app/vmselect/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmselect/main.go b/app/vmselect/main.go index 097ac71f38..0f198f46c7 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -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/") { // 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. // 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/