From 0bb3ed0b0ca243919b7ef078ac637666bf06c287 Mon Sep 17 00:00:00 2001 From: David Cook Date: Wed, 2 Apr 2025 14:11:47 +1100 Subject: [PATCH] Add filter for nginx HTTP errors (4xx and 5xx) An excessive number of errors is likely abuse of some kind. This may include application login errors, if the app responds with an appropriate HTTP status code. --- config/filter.d/nginx-http-errors.conf | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/filter.d/nginx-http-errors.conf diff --git a/config/filter.d/nginx-http-errors.conf b/config/filter.d/nginx-http-errors.conf new file mode 100644 index 00000000..33af0072 --- /dev/null +++ b/config/filter.d/nginx-http-errors.conf @@ -0,0 +1,7 @@ +# Nginx client and server errors (HTTP 4xx or 5xx) +# +# Author: David Cook +# Inspired by https://serverfault.com/a/849859/959055 + +[Definition] +failregex = -.*"(GET|POST|HEAD).*HTTP.*" [4-5][0-9][0-9]