There was an error while loading. Please reload this page.
1 parent 8d11552 commit 5d20a0cCopy full SHA for 5d20a0c
1 file changed
router/router.go
@@ -56,7 +56,7 @@ func (self *Router) ServeHTTP(w http.ResponseWriter, r *http.Request) {
56
for _, route := range self.routes {
57
matches := route.regex.FindStringSubmatch(r.URL.Path)
58
if 0 < len(matches) {
59
- if r.Method != route.method {
+ if r.Method != route.method && route.method != "*" {
60
allow = append(allow, route.method)
61
continue
62
}
0 commit comments