summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2022-10-06 21:40:08 -0400
committerGitHub <noreply@github.com>2022-10-06 19:40:08 -0600
commitd46ba2e27fca841c289629fcc5ecf86b7f47d1f9 (patch)
tree6c6ab7310e4b8e725ec9d6eba3d534675c05e7b3
parent498f32bab96ba00e1a7d04c6bc8b367c97d8a335 (diff)
httpcaddyfile: Fix `metrics` global option parsing (#5126)
-rw-r--r--caddyconfig/httpcaddyfile/serveroptions.go2
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)