Set server version in correct place
This commit is contained in:
parent
baa3990d38
commit
0cce8aecc6
@ -5,7 +5,7 @@ import (
|
||||
"runtime"
|
||||
)
|
||||
|
||||
var Version = "v0.1.4"
|
||||
var Version = "v0.1.5"
|
||||
var Build string
|
||||
|
||||
func FullVersion() string {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user