As in go-chi
, set middleware at the level of individual routes, and not just globally for all routes
// Routes creates a REST router
func Routes() chi.Router {
r := chi.NewRouter()
r.Use(middleware.Captcha)
r.Post("/", Login)
return r
}
How for Login
to specify a unique middleware or to exclude from the general middleware?