Stop setting content-type twice

This commit is contained in:
Torjus Håkestad 2021-06-18 14:59:25 +02:00
parent 0cce8aecc6
commit 59c401b1dc
2 changed files with 1 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import (
"runtime" "runtime"
) )
var Version = "v0.1.5" var Version = "v0.1.6"
var Build string var Build string
func FullVersion() string { func FullVersion() string {

View File

@ -90,7 +90,6 @@ func NewServer(cfg config.FrontendConfig, hs *honeypot.HoneypotServer, store sto
r.Get("/*", s.IndexHandler("web/vue-frontend/dist")) r.Get("/*", s.IndexHandler("web/vue-frontend/dist"))
r.Get("/stream", s.HandlerAttemptStream) r.Get("/stream", s.HandlerAttemptStream)
r.Route("/api", func(r chi.Router) { r.Route("/api", func(r chi.Router) {
r.Use(middleware.SetHeader("Content-Type", "application/json"))
r.Get("/stats", s.HandlerStats) r.Get("/stats", s.HandlerStats)
r.Get("/stream", s.HandlerAttemptStream) r.Get("/stream", s.HandlerAttemptStream)
r.Get("/query", s.HandlerQuery) r.Get("/query", s.HandlerQuery)