Add server version header
This commit is contained in:
parent
248735710a
commit
baa3990d38
@ -5,7 +5,7 @@ import (
|
||||
"runtime"
|
||||
)
|
||||
|
||||
var Version = "v0.1.3"
|
||||
var Version = "v0.1.4"
|
||||
var Build string
|
||||
|
||||
func FullVersion() string {
|
||||
|
@ -14,6 +14,7 @@ import (
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-chi/chi/v5/middleware"
|
||||
"github.com/google/uuid"
|
||||
"github.uio.no/torjus/apiary"
|
||||
"github.uio.no/torjus/apiary/config"
|
||||
"github.uio.no/torjus/apiary/honeypot"
|
||||
"github.uio.no/torjus/apiary/honeypot/store"
|
||||
@ -151,6 +152,7 @@ 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