diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-05-23 14:42:14 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-05-23 14:42:14 -0600 |
commit | 5a4a1421de9cc3a9d5aba9e48c195030cc24f576 (patch) | |
tree | c0d661f4ddf899af32765ac8ffaeebf97a0fd50c /modules/caddyhttp/routes.go | |
parent | 34a25dd5580948ff5b83843b81e72bda1b133189 (diff) |
Fix error handling and matching catch-all routes
Diffstat (limited to 'modules/caddyhttp/routes.go')
-rw-r--r-- | modules/caddyhttp/routes.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go index 59f287e..14c9f32 100644 --- a/modules/caddyhttp/routes.go +++ b/modules/caddyhttp/routes.go @@ -31,7 +31,8 @@ func (sr ServerRoute) anyMatcherSetMatches(r *http.Request) bool { return true } } - return false + // if no matchers, always match + return len(sr.matcherSets) == 0 } // MatcherSet is a set of matchers which |