do not register middlewares on /healthz path (#28)

chore(api): ignore common middlewares for health check endpoint
This commit is contained in:
Mark Lee 2020-04-14 16:06:49 +09:00 committed by GitHub
parent f75c9bcaac
commit 78501c4c49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,9 @@ func NewRouter(conf *config.Config) *http.ServeMux {
handler = mw(handler)
}
for _, mw := range middlewares {
if route.Path == "/healthz" {
continue
}
handler = mw(handler)
}
router.Handle(route.Path, handler)