about summary refs log tree commit diff stats
path: root/internal/server/headers.go
diff options
context:
space:
mode:
authorAlan Pearce2024-05-14 21:16:23 +0200
committerAlan Pearce2024-05-14 21:45:02 +0200
commit1a5c82e2d08accb6330c4164ab987b87157b10ed (patch)
tree48d6a913809e60b1a0cc28a8b67413ffaf979f97 /internal/server/headers.go
parentf08094f23aa4dc7d63a7c98b4429d88005fe3a2d (diff)
downloadsearchix-1a5c82e2d08accb6330c4164ab987b87157b10ed.tar.lz
searchix-1a5c82e2d08accb6330c4164ab987b87157b10ed.tar.zst
searchix-1a5c82e2d08accb6330c4164ab987b87157b10ed.zip
build: bake git hash into build for headers and --version
Diffstat (limited to 'internal/server/headers.go')
-rw-r--r--internal/server/headers.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/server/headers.go b/internal/server/headers.go
index 4fb9efd..562fccc 100644
--- a/internal/server/headers.go
+++ b/internal/server/headers.go
@@ -11,6 +11,7 @@ func AddHeadersMiddleware(next http.Handler, config *cfg.Config) http.Handler {
 			w.Header().Add(h, v)
 		}
 		w.Header().Add("Content-Security-Policy", config.Web.ContentSecurityPolicy.String())
+		w.Header().Add("Server", "searchix/"+cfg.ShortSHA)
 
 		next.ServeHTTP(w, r)
 	})