diff options
author | Francis Lavoie <[email protected]> | 2022-10-06 21:40:08 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-10-06 19:40:08 -0600 |
commit | d46ba2e27fca841c289629fcc5ecf86b7f47d1f9 (patch) | |
tree | 6c6ab7310e4b8e725ec9d6eba3d534675c05e7b3 | |
parent | 498f32bab96ba00e1a7d04c6bc8b367c97d8a335 (diff) | |
download | caddy-d46ba2e27fca841c289629fcc5ecf86b7f47d1f9.tar.gz caddy-d46ba2e27fca841c289629fcc5ecf86b7f47d1f9.zip |
httpcaddyfile: Fix `metrics` global option parsing (#5126)
-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 8ab8969de..3e206c873 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) |