Rate limit requests from bots on Gitea
For now this is 240 r/m (4r/s), for Claude, Sogou and Meta user agents. The values are pretty conservative, I initially had tighter limits. Let's see how it goes, this is running on Fornax and Draco and right now we're not hitting the limits.
This commit is contained in:
@@ -20,6 +20,9 @@ server {
|
||||
|
||||
proxy_intercept_errors on;
|
||||
|
||||
# Rate limit for bots. Defined in /etc/openresty/conf.d/rate_limits.conf
|
||||
limit_req zone=bots burst=10; # allow a larger spike for asset bursts
|
||||
|
||||
location ~ ^/(avatars|repo-avatars)/.*$ {
|
||||
proxy_buffers 1024 8k;
|
||||
proxy_pass http://_gitea_web;
|
||||
|
||||
Reference in New Issue
Block a user