From a5ab4406d8b7d34da8e653d8d5debd2c0735b484 Mon Sep 17 00:00:00 2001 From: Jan Przybylak Date: Sun, 21 Jun 2020 18:24:09 +0200 Subject: [PATCH] Removed unnecessary escape sequence This commit also contains changes to match requests that are 100% empty (by using "*" instead of "+" in the regex) --- config/filter.d/nginx-bad-request.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/filter.d/nginx-bad-request.conf b/config/filter.d/nginx-bad-request.conf index 03721f86..2b8f5ab6 100644 --- a/config/filter.d/nginx-bad-request.conf +++ b/config/filter.d/nginx-bad-request.conf @@ -4,7 +4,8 @@ [Definition] # The request often doesn't contain a method, only some encoded garbage -failregex = ^ \- \S+ \[\] \"[^\"]+\" 400 +# This will also match requests that are entirely empty +failregex = ^ - \S+ \[\] "[^"]*" 400 datepattern = {^LN-BEG}%%ExY(?P<_sep>[-/.])%%m(?P=_sep)%%d[T ]%%H:%%M:%%S(?:[.,]%%f)?(?:\s*%%z)? ^[^\[]*\[({DATE})