Nginx limit_req_zone ip exceptions
geo $limited_ip {
default 1;
127.0.0.1 0;
99.99.99.99 0;
}
map $limited_ip $limited_ip_key {
0 '';
1 $binary_remote_addr;
}
limit_req_zone $limited_ip_key zone=one:10m rate=5r/s;;
- http://nginx.org/en/docs/http/ngx_http_geo_module.html
- http://nginx.org/en/docs/http/ngx_http_map_module.html