mirror of
https://github.com/caddyserver/caddy.git
synced 2025-12-08 06:09:53 +00:00
httpcaddyfile: reject blocks in log_skip directive (#7056)
This commit is contained in:
parent
1481c0411a
commit
0f209f62eb
1 changed files with 5 additions and 0 deletions
|
|
@ -1166,6 +1166,11 @@ func parseLogSkip(h Helper) (caddyhttp.MiddlewareHandler, error) {
|
||||||
if h.NextArg() {
|
if h.NextArg() {
|
||||||
return nil, h.ArgErr()
|
return nil, h.ArgErr()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if h.NextBlock(0) {
|
||||||
|
return nil, h.Err("log_skip directive does not accept blocks")
|
||||||
|
}
|
||||||
|
|
||||||
return caddyhttp.VarsMiddleware{"log_skip": true}, nil
|
return caddyhttp.VarsMiddleware{"log_skip": true}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue