I'd be shocked if the map function doesn't use a smart search scheme rather than check every item.
I had asked the same question once and got no to the point response. So here is what I infer: the if causes nginx to check the header for each request against the list of patterns you have configured and return a 403 if found . So the processing slows down on each request to for the if processing.. If you see mod_security etc ..this is also doing something similar and doing a check on each request - so in that way (that is if you are willing to compromise lack of speed for the user agent checking) this is fine . But you are definitely making the nginx slower and consume more resource by adding the if there and making it more by increasing the list size. On Mon, Nov 14, 2016 at 9:00 PM, <li...@lazygranch.com> wrote: You can block some of those bots at the firewall permanently. Anoop P Alias |
_______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx