diff options
author | Alan Pearce | 2024-05-15 21:47:13 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-15 21:47:13 +0200 |
commit | eb88ab15adaf23a61c783afe76b646855814d38a (patch) | |
tree | 11e729d5c7aaa1c633188bcd7e4a89e690f2c67b /internal/server/error.go | |
parent | fa97ca832d6dc301dabb5d9c76730630f99534e0 (diff) | |
download | searchix-eb88ab15adaf23a61c783afe76b646855814d38a.tar.lz searchix-eb88ab15adaf23a61c783afe76b646855814d38a.tar.zst searchix-eb88ab15adaf23a61c783afe76b646855814d38a.zip |
feat: add caching header (except on error pages)
Diffstat (limited to 'internal/server/error.go')
-rw-r--r-- | internal/server/error.go | 2 |
1 files changed, 2 insertions, 0 deletions
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) |