From eb88ab15adaf23a61c783afe76b646855814d38a Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 15 May 2024 21:47:13 +0200 Subject: feat: add caching header (except on error pages) --- internal/server/error.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/server/error.go') diff --git a/internal/server/error.go b/internal/server/error.go index 51453f4..6994ad7 100644 --- a/internal/server/error.go +++ b/internal/server/error.go @@ -21,6 +21,8 @@ func createErrorHandler( Code: code, Message: message, } + w.Header().Set("Cache-Control", "no-store") + w.Header().Del("Vary") w.WriteHeader(code) if r.Header.Get("Fetch") == "true" { err = templates["error"].ExecuteTemplate(w, "main", indexData) -- cgit 1.4.1