Disable ANSI colors in logs and fix fail2ban regex
- Add with_ansi(false) to all tracing_subscriber fmt layers so log output (both stdout and file) is plain text without escape codes. This is critical for Docker deployments and fail2ban log parsing. - Remove ^ anchor from fail2ban failregex since log lines have a timestamp/level prefix before RATE_LIMIT.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
[Definition]
|
||||
failregex = ^RATE_LIMIT client_ip=<HOST> host=\S+ path=\S+ status=\d+$
|
||||
failregex = RATE_LIMIT client_ip=<HOST> host=\S+ path=\S+ status=\d+
|
||||
ignoreregex =
|
||||
Reference in New Issue
Block a user