Hello. I have GoogleBot taking up 100% of my channel. How can I limit it? Let's say 10 requests per minute.
I tried this code. It doesn't work for me. I wrote it in nginx after http{
map $http_user_agent $isbot_ua {
default 0;
~*(GoogleBot|bingbot|YandexBot|mj12bot) 1;
}
map $isbot_ua $limit_bot {
0 "";
1 $binary_remote_addr;
}
limit_req_zone $limit_bot zone=bots:10m rate=1r/m;
limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;
limit_req zone=bots burst=2 nodelay;
limit_req zone=one burst=15 nodelay;
limit_req_status 429;
limit_conn_status 429;