Welcome! Log In Create A New Profile

Advanced

Re: Limit robots

António P. P. Almeida
January 17, 2012 02:28PM
On 17 Jan 2012 17h15 WET, lists@ruby-forum.com wrote:

> Your solution works great for rate limiting, but I need the requests
> to still be 200 return code when they are not limited. Any ideas?

Yes. Try:

- error_page 418 @bots;
+ error_page 418 =200 @bots;

I.e.:

location / {
error_page 418 =200 @bots;

if ($is_bot) {
return 418;
}
...
}

location @bots {
limit_req zone=useragenttrack burst=100 nodelay;
...
}

--- appa

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Limit robots

double January 13, 2012 05:57AM

Re: Limit robots

António P. P. Almeida January 13, 2012 08:52AM

Re: Limit robots

Jeff J. January 17, 2012 12:18PM

Re: Limit robots

António P. P. Almeida January 17, 2012 02:28PM

Re: Limit robots

Jeff J. January 17, 2012 03:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready