Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 13, 09:15 UTC
httpcaddyfile: Fix `metrics` global option parsing (#5126)
Francis Lavoie committed
Oct 6, 2022 at 21:40 UTC
d46ba2e27fca841c289629fcc5ecf86b7f47d1f9
1 file changed
+1
-1
caddyconfig/httpcaddyfile/serveroptions.go
+1
-1
@@ -180,7 +180,7 @@ func unmarshalCaddyfileServerOptions(d *caddyfile.Dispenser) (any, error) {
180
if d.NextArg() {
181
return nil, d.ArgErr()
182
}
183
- if d.NextBlock(0) {
183
+ if nesting := d.Nesting(); d.NextBlock(nesting) {
184
return nil, d.ArgErr()
185
}
186
serverOpts.Metrics = new(caddyhttp.Metrics)