PascalMinder / geoblock

Traefik middleware plugin - Deny requests based on country of origin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How does forceMonthlyUpdate work ?

lumpidu opened this issue · comments

Let's assume I have set cacheSize: 15000 and forceMonthlyUpdate=true.

Is the monthly update done exactly 1 month after an IP address has been cached or at a fixed interval, e.g. 01.12.2022 ? In the latter case, accessing GeoJs.io with 15000 entries at once would be like a DoS, right ?

If you set the monthly update to true and an IP cache entry is used again, and the entry is older than one month, the entry is invalidated and GeoJs.io will be called.

Ok, that sounds reasonable. Is there some minimal time between the requests for these updates ?

No, since the check will be run on each connection. So, if 10 different IP addresses connect and each of them is in the cache and each of them did not visit since 1 months, each 10 will update around the same time.

thanks for the clarifications