diff options
author | Francis Lavoie <lavofr@gmail.com> | 2022-10-06 21:40:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 19:40:08 -0600 |
commit | d46ba2e27fca841c289629fcc5ecf86b7f47d1f9 (patch) | |
tree | 6c6ab7310e4b8e725ec9d6eba3d534675c05e7b3 /caddyconfig/httpcaddyfile | |
parent | 498f32bab96ba00e1a7d04c6bc8b367c97d8a335 (diff) |
httpcaddyfile: Fix `metrics` global option parsing (#5126)
Diffstat (limited to 'caddyconfig/httpcaddyfile')
-rw-r--r-- | caddyconfig/httpcaddyfile/serveroptions.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/caddyconfig/httpcaddyfile/serveroptions.go b/caddyconfig/httpcaddyfile/serveroptions.go index 8ab8969..3e206c8 100644 --- a/caddyconfig/httpcaddyfile/serveroptions.go +++ b/caddyconfig/httpcaddyfile/serveroptions.go @@ -180,7 +180,7 @@ func unmarshalCaddyfileServerOptions(d *caddyfile.Dispenser) (any, error) { if d.NextArg() { return nil, d.ArgErr() } - if d.NextBlock(0) { + if nesting := d.Nesting(); d.NextBlock(nesting) { return nil, d.ArgErr() } serverOpts.Metrics = new(caddyhttp.Metrics) |