'IP whitelisting in bucket4j
I am using bucket4j in my spring boot application to prevent DOS attacks where if an ip makes a lots of requests in a minute, it is blocked. I am using following config for that
bucket4j.enabled=true
bucket4j.filters[0].cache-name=buckets
bucket4j.filters[0].filter-method=servlet
bucket4j.filters[0].http-response-body={ "message": "Too many requests" }
bucket4j.filters[0].url=.*
bucket4j.filters[0].strategy=first
bucket4j.filters[0].rate-limits[0].bandwidths[0].capacity=20
bucket4j.filters[0].rate-limits[0].bandwidths[0].time=1
bucket4j.filters[0].rate-limits[0].bandwidths[0].unit=minutes
But there is an IP that is actually supposed to make a lot of calls. How can I whitelist that IP?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
