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