diff options
author | Matthew Holt <[email protected]> | 2019-05-10 21:07:02 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2019-05-10 21:07:02 -0600 |
commit | 8ae0d6a509fd1b871457cf742369af04346933a8 (patch) | |
tree | 9a0b977e5f36acc6f06737ff34b1f21d608ada6f /modules/caddyhttp/routes.go | |
parent | 48b5a803208548d143b7ead9b6fc9b524cd0e031 (diff) | |
download | caddy-8ae0d6a509fd1b871457cf742369af04346933a8.tar.gz caddy-8ae0d6a509fd1b871457cf742369af04346933a8.zip |
caddyhttp: Implement better HTTP matchers including regexp; add tests
Diffstat (limited to 'modules/caddyhttp/routes.go')
-rw-r--r-- | modules/caddyhttp/routes.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go index cc26436e6..48a5000aa 100644 --- a/modules/caddyhttp/routes.go +++ b/modules/caddyhttp/routes.go @@ -13,7 +13,7 @@ type serverRoute struct { Apply []json.RawMessage `json:"apply"` Respond json.RawMessage `json:"respond"` - Exclusive bool `json:"exclusive"` + Terminal bool `json:"terminal"` // decoded values matchers []RouteMatcher @@ -49,9 +49,7 @@ routeLoop: if responder == nil { responder = route.responder } - // TODO: Should exclusive apply to only middlewares, or responder too? - // i.e. what if they haven't set a responder yet, but the first middleware chain is exclusive... - if route.Exclusive { + if route.Terminal { break } } |