httpd: move the check connection middleware before the logger middleware

Fixes #543
This commit is contained in:
Nicola Murino 2021-09-19 08:14:59 +02:00
parent 6ea38188e8
commit bf4b3e6840
No known key found for this signature in database
GPG key ID: 2F1FB59433D5A8CB

View file

@ -868,9 +868,9 @@ func (s *httpdServer) initializeRouter() {
s.router = chi.NewRouter()
s.router.Use(middleware.RequestID)
s.router.Use(s.checkConnection)
s.router.Use(logger.NewStructuredLogger(logger.GetLogger()))
s.router.Use(recoverer)
s.router.Use(s.checkConnection)
s.router.Use(middleware.GetHead)
s.router.Use(middleware.StripSlashes)