From 6a1a6507d9c20ec7847c3476d7591e6b56a6ccfc Mon Sep 17 00:00:00 2001 From: MickaelK Date: Sat, 30 Aug 2025 01:57:10 +1000 Subject: [PATCH] fix (caching): obey to the no-cache http header --- server/ctrl/static.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ctrl/static.go b/server/ctrl/static.go index 0971184b..d12898ea 100644 --- a/server/ctrl/static.go +++ b/server/ctrl/static.go @@ -402,7 +402,7 @@ func ServeBundle() func(*App, http.ResponseWriter, *http.Request) { return func(ctx *App, res http.ResponseWriter, req *http.Request) { res.Header().Set("Content-Type", "application/javascript") - if strings.Contains(req.Header.Get("Accept-Encoding"), "br") { + if strings.Contains(req.Header.Get("Accept-Encoding"), "br") && req.Header.Get("Cache-Control") != "no-cache" { res.Header().Set("Content-Encoding", "br") res.Write(bundleBr) return