Skip to content

Instantly share code, notes, and snippets.

@gotomypc
Forked from skaag/limt_req_zone_whitelist
Created August 10, 2014 23:44
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 gotomypc/25e99e48dbc48b20eece to your computer and use it in GitHub Desktop.
Save gotomypc/25e99e48dbc48b20eece to your computer and use it in GitHub Desktop.
geo $limited {
default 1;
# Wordpress Jetpack ranges:
192.0.0.0/16 0;
66.135.0.0/16 0;
66.155.0.0/16 0;
76.74.0.0/16 0;
}
map $limited $limit {
1 $binary_remote_addr;
0 "";
}
limit_req_zone $limit zone=apizone:5m rate=30r/m;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment