From 1a5c82e2d08accb6330c4164ab987b87157b10ed Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 14 May 2024 21:16:23 +0200 Subject: build: bake git hash into build for headers and --version --- internal/server/headers.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/server/headers.go') 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) }) -- cgit 1.4.1