summaryrefslogtreecommitdiff
path: root/caddyconfig/httpcaddyfile/handlers.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-10 19:21:52 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-10 19:21:52 -0600
commit2459c292a4d6fb0552eb9be3cecd955093ed853b (patch)
tree5f10e9c5d8e9250e83f7282e8d57d386cb54e8a6 /caddyconfig/httpcaddyfile/handlers.go
parent0cf592fa2e0d2fff8e9379095bbe17f7c8cbd4f2 (diff)
caddyfile: Improve Dispenser.NextBlock() to support nesting
Diffstat (limited to 'caddyconfig/httpcaddyfile/handlers.go')
-rw-r--r--caddyconfig/httpcaddyfile/handlers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/caddyconfig/httpcaddyfile/handlers.go b/caddyconfig/httpcaddyfile/handlers.go
index 9a29e97..e133028 100644
--- a/caddyconfig/httpcaddyfile/handlers.go
+++ b/caddyconfig/httpcaddyfile/handlers.go
@@ -28,7 +28,7 @@ func (st *ServerType) parseMatcherDefinitions(d *caddyfile.Dispenser) (map[strin
matchers := make(map[string]map[string]json.RawMessage)
for d.Next() {
definitionName := d.Val()
- for d.NextBlock() {
+ for nesting := d.Nesting(); d.NextBlock(nesting); {
matcherName := d.Val()
mod, err := caddy.GetModule("http.matchers." + matcherName)
if err != nil {