diff --git a/router.go b/router.go index 14a9b7a7..c219ead9 100644 --- a/router.go +++ b/router.go @@ -311,6 +311,11 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) context.Input.CruSession = GlobalSessions.SessionStart(w, r) } + if !inSlice(strings.ToLower(r.Method), HTTPMETHOD) { + http.Error(w, "Method Not Allowed", 405) + return + } + var runrouter *controllerInfo var findrouter bool