Skip to content

Commit

Permalink
httpcaddyfile: Fix metrics global option parsing (#5126)
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie committed Oct 7, 2022
1 parent 498f32b commit d46ba2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caddyconfig/httpcaddyfile/serveroptions.go
Expand Up @@ -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)
Expand Down

0 comments on commit d46ba2e

Please sign in to comment.