diff --git a/version.go b/version.go index 2c0bed8..3c113e2 100644 --- a/version.go +++ b/version.go @@ -5,7 +5,7 @@ import ( "runtime" ) -var Version = "v0.1.4" +var Version = "v0.1.5" var Build string func FullVersion() string { diff --git a/web/server.go b/web/server.go index 16d701b..a1b1a1c 100644 --- a/web/server.go +++ b/web/server.go @@ -84,6 +84,7 @@ func NewServer(cfg config.FrontendConfig, hs *honeypot.HoneypotServer, store sto r.Use(middleware.RealIP) r.Use(middleware.RequestID) r.Use(s.LoggingMiddleware) + r.Use(middleware.SetHeader("Server", apiary.FullVersion())) r.Route("/", func(r chi.Router) { r.Get("/*", s.IndexHandler("web/vue-frontend/dist")) @@ -152,7 +153,6 @@ func (s *Server) HandlerAttemptStream(w http.ResponseWriter, r *http.Request) { w.Header().Set("Cache-Control", "no-cache") w.Header().Set("Connection", "keep-alive") w.Header().Set("Access-Control-Allow-Origin", "*") - w.Header().Set("Server", apiary.FullVersion()) id, ch := s.addAttemptListener() defer s.closeAttemptListener(id) w.WriteHeader(http.StatusOK)