diff --git a/handler/middleware/allowed_methods.go b/handler/middleware/allowed_methods.go index c2e9552c5..c865a8d5c 100644 --- a/handler/middleware/allowed_methods.go +++ b/handler/middleware/allowed_methods.go @@ -42,7 +42,8 @@ func NewAllowedMethodsHandler(allowedMethods, defaultAllowedMethods []string, al } func (a *AllowedMethodsHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { - if _, ok := a.allowedMethods[req.Method]; !ok { + method := strings.ToUpper(req.Method) + if _, ok := a.allowedMethods[method]; !ok { a.notAllowedHandler.ServeHTTP(rw, req) return }