Skip to content

Commit 0f209f6

Browse files
authored
httpcaddyfile: reject blocks in log_skip directive (#7056)
1 parent 1481c04 commit 0f209f6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

caddyconfig/httpcaddyfile/builtins.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,11 @@ func parseLogSkip(h Helper) (caddyhttp.MiddlewareHandler, error) {
11661166
if h.NextArg() {
11671167
return nil, h.ArgErr()
11681168
}
1169+
1170+
if h.NextBlock(0) {
1171+
return nil, h.Err("log_skip directive does not accept blocks")
1172+
}
1173+
11691174
return caddyhttp.VarsMiddleware{"log_skip": true}, nil
11701175
}
11711176

0 commit comments

Comments
 (0)