From 0c9eeef143a73f1d74e64d006e9d9ce3cb45aa55 Mon Sep 17 00:00:00 2001 From: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com> Date: Thu, 16 Feb 2023 01:29:04 +0200 Subject: [PATCH] Add Cache-Control header to custom css/js (#3434) --- internal/api/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/api/server.go b/internal/api/server.go index 22bb14ad0..0f6e26f52 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -339,6 +339,9 @@ func serveFiles(w http.ResponseWriter, r *http.Request, name string, paths []str } } + // Always revalidate with server + w.Header().Set("Cache-Control", "no-cache") + bufferReader := bytes.NewReader(buffer.Bytes()) http.ServeContent(w, r, name, latestModTime, bufferReader) }