Skip to content

Instantly share code, notes, and snippets.

@juev
Forked from supairish/gist:2951524
Created March 11, 2014 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juev/9484542 to your computer and use it in GitHub Desktop.
Save juev/9484542 to your computer and use it in GitHub Desktop.
http {
map $http_user_agent $limit_bots {
default '';
~*(google|bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {
location / {
limit_req zone=bots burst=5 nodelay;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment