diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-09-10 19:21:52 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-09-10 19:21:52 -0600 |
commit | 2459c292a4d6fb0552eb9be3cecd955093ed853b (patch) | |
tree | 5f10e9c5d8e9250e83f7282e8d57d386cb54e8a6 /modules/caddyhttp/matchers.go | |
parent | 0cf592fa2e0d2fff8e9379095bbe17f7c8cbd4f2 (diff) |
caddyfile: Improve Dispenser.NextBlock() to support nesting
Diffstat (limited to 'modules/caddyhttp/matchers.go')
-rw-r--r-- | modules/caddyhttp/matchers.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/caddyhttp/matchers.go b/modules/caddyhttp/matchers.go index 4d0eea5..23047d0 100644 --- a/modules/caddyhttp/matchers.go +++ b/modules/caddyhttp/matchers.go @@ -258,6 +258,9 @@ func (MatchHeader) CaddyModule() caddy.ModuleInfo { // UnmarshalCaddyfile implements caddyfile.Unmarshaler. func (m *MatchHeader) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { + if *m == nil { + *m = make(map[string][]string) + } for d.Next() { var field, val string if !d.Args(&field, &val) { |