mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-15 17:22:44 +02:00
logs ignore healthcheck requests.
This commit is contained in:
parent
ce42d81eeb
commit
35a092630e
1 changed files with 6 additions and 0 deletions
|
@ -13,6 +13,12 @@ func Logger(next http.Handler) http.Handler {
|
|||
fn := func(w http.ResponseWriter, r *http.Request) {
|
||||
req := map[string]interface{}{}
|
||||
|
||||
// ignore healthcheck
|
||||
if r.RequestURI == "/health" {
|
||||
next.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
if reqID := middleware.GetReqID(r.Context()); reqID != "" {
|
||||
req["id"] = reqID
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue