diff --git a/cmd/server/main.go b/cmd/server/main.go index 9ad8ab9..733b092 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -446,9 +446,13 @@ func main() { // If the file exists, serve it; otherwise serve index.html (SPA fallback) path := staticDir + r.URL.Path if _, err := os.Stat(path); os.IsNotExist(err) { + w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate") http.ServeFile(w, r, staticDir+"/index.html") return } + if r.URL.Path == "/" || r.URL.Path == "/index.html" { + w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate") + } fileServer.ServeHTTP(w, r) }) }