server: moved www request id

This commit is contained in:
Tigor Hutasuhut 2024-04-08 23:21:30 +07:00
parent 31adf0755e
commit 33b35e6839

View file

@ -21,7 +21,6 @@ type WWW struct {
}
func (www *WWW) Register(router chi.Router) {
router.Use(chimiddleware.RequestID)
router.Use(chimiddleware.RealIP)
router.
With(chimiddleware.RequestLogger(middleware.ChiSimpleLogger{})).
@ -35,6 +34,7 @@ func (www *WWW) Register(router chi.Router) {
}
router.Group(func(r chi.Router) {
r.Use(chimiddleware.RequestID)
r.Use(chimiddleware.RequestLogger(middleware.ChiLogger{}))
r.Use(chimiddleware.SetHeader("Content-Type", "text/html; utf-8"))
r.Get("/", www.Home)