mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-31 00:06:04 +08:00
caddyfile: Improve Dispenser.NextBlock() to support nesting
This commit is contained in:
@ -49,7 +49,7 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
|
||||
}
|
||||
|
||||
// if not, they should be in a block
|
||||
for h.NextBlock() {
|
||||
for h.NextBlock(0) {
|
||||
if hasArgs {
|
||||
return nil, h.Err("cannot specify headers in both arguments and block")
|
||||
}
|
||||
|
Reference in New Issue
Block a user