diff --git a/internal/admin/server.go b/internal/admin/server.go index c963d6a..b333bd1 100644 --- a/internal/admin/server.go +++ b/internal/admin/server.go @@ -97,6 +97,13 @@ func (a *Server) staticHandler() http.Handler { r.URL.Path = "/" } } + // The UI ships inside the binary and only changes when the binary does, + // so a browser that cached app.js/styles.css under a heuristic freshness + // lifetime keeps running the previous build's frontend against the new + // backend — the UI then shows stale pages (or breaks outright) until the + // cache happens to expire or the operator hard-refreshes. Force + // revalidation instead. + w.Header().Set("Cache-Control", "no-cache") files.ServeHTTP(w, r) }) }