From 8ae0d6a509fd1b871457cf742369af04346933a8 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 10 May 2019 21:07:02 -0600 Subject: caddyhttp: Implement better HTTP matchers including regexp; add tests --- modules/caddyhttp/routes.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/caddyhttp/routes.go') diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go index cc26436..48a5000 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 } } -- cgit v1.2.3