rate limiting: allow to exclude IP addresses/ranges

Fixes #563
This commit is contained in:
Nicola Murino
2021-10-03 20:50:05 +02:00
parent 1b4a1fbbe5
commit ea01c3a125
11 changed files with 80 additions and 2 deletions

View File

@@ -91,6 +91,7 @@ The configuration file contains the following sections:
- `burst`, integer. Burst defines the maximum number of requests allowed to go through in the same arbitrarily small period of time. Default: 1
- `type`, integer. 1 means a global rate limiter, independent from the source host. 2 means a per-ip rate limiter. Default: 2
- `protocols`, list of strings. Available protocols are `SSH`, `FTP`, `DAV`, `HTTP`. By default all supported protocols are enabled
- `allow_list`, list of IP addresses and IP ranges excluded from rate limiting. Default: empty
- `generate_defender_events`, boolean. If `true`, the defender is enabled, and this is not a global rate limiter, a new defender event will be generated each time the configured limit is exceeded. Default `false`
- `entries_soft_limit`, integer.
- `entries_hard_limit`, integer. The number of per-ip rate limiters kept in memory will vary between the soft and hard limit