about summary refs log tree commit diff stats
path: root/internal/server/error.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-15 21:47:13 +0200
committerAlan Pearce2024-05-15 21:47:13 +0200
commiteb88ab15adaf23a61c783afe76b646855814d38a (patch)
tree11e729d5c7aaa1c633188bcd7e4a89e690f2c67b /internal/server/error.go
parentfa97ca832d6dc301dabb5d9c76730630f99534e0 (diff)
downloadsearchix-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.go2
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)