mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-01 22:32:23 +08:00
httpcaddyfile: reject blocks in log_skip directive (#7056)
This commit is contained in:
committed by
GitHub
parent
1481c0411a
commit
0f209f62eb
@ -1166,6 +1166,11 @@ func parseLogSkip(h Helper) (caddyhttp.MiddlewareHandler, error) {
|
||||
if h.NextArg() {
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user