add debug log
This commit is contained in:
parent
22ab7e250b
commit
beadb78fd3
@ -188,6 +188,7 @@ func checkMethodPath(w http.ResponseWriter, r *http.Request, mr methodRegex) err
|
||||
http.Error(w, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed)
|
||||
return ErrHTTPMethodNotAllowed{httpMethod: r.Method}
|
||||
}
|
||||
log.Debug().Msgf("%s is a registered HTTP method", r.Method)
|
||||
if !req.MatchString(r.URL.Path) {
|
||||
http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden)
|
||||
return ErrNoMatch{
|
||||
@ -195,6 +196,7 @@ func checkMethodPath(w http.ResponseWriter, r *http.Request, mr methodRegex) err
|
||||
httpMethod: r.Method,
|
||||
}
|
||||
}
|
||||
log.Debug().Msgf("%s matches %s", r.URL.Path, req.String())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user