debug logs

This commit is contained in:
Adrien PONSIN 2025-04-15 20:08:28 +02:00
parent 113faf0212
commit 156c338ce7
No known key found for this signature in database
GPG Key ID: 7B4D4A32C05C475E

View File

@ -194,6 +194,7 @@ func (ph *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
func checkMethodPath(w http.ResponseWriter, r *http.Request, mr methodRegex) error { func checkMethodPath(w http.ResponseWriter, r *http.Request, mr methodRegex) error {
req, ok := mr[r.Method] req, ok := mr[r.Method]
if !ok { if !ok {
log.Debug().Msgf("%s is not a registerd HTTP method", r.Method)
http.Error(w, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed) http.Error(w, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed)
return ErrHTTPMethodNotAllowed{httpMethod: r.Method} return ErrHTTPMethodNotAllowed{httpMethod: r.Method}
} }