diff --git a/main.go b/main.go index 7a5dfa7..b97eeb1 100644 --- a/main.go +++ b/main.go @@ -54,6 +54,7 @@ func main() { } data, _ := fs.ReadFile(webFS, "web/index.html") w.Header().Set("Content-Type", "text/html; charset=utf-8") + w.Header().Set("Cache-Control", "no-cache, must-revalidate") w.Write(data) }) @@ -71,6 +72,11 @@ func main() { mux.HandleFunc("POST /f/{id}/auth", h.AuthSubmit) mux.HandleFunc("DELETE /f/{id}", h.Delete) + // Favicon (prevent 404) + mux.HandleFunc("GET /favicon.ico", func(w http.ResponseWriter, _ *http.Request) { + w.WriteHeader(http.StatusNoContent) + }) + // Health mux.HandleFunc("GET /health", func(w http.ResponseWriter, _ *http.Request) { w.Header().Set("Content-Type", "application/json")