Showing
1 changed file
with
13 additions
and
1 deletions
@@ -30,7 +30,19 @@ http { | @@ -30,7 +30,19 @@ http { | ||
30 | 30 | ||
31 | 31 | ||
32 | # limit req configuration limit for 20r/s for every ip | 32 | # limit req configuration limit for 20r/s for every ip |
33 | - limit_req_zone $binary_remote_addr zone=limit_ufo:30m rate=20r/s; | 33 | + geo $limited { |
34 | + default 1; | ||
35 | + 10.66.0.0/16 0; | ||
36 | + 10.67.0.0/16 0; | ||
37 | + 192.168.0.0/16 0; | ||
38 | + 172.31.0.0/16 0; | ||
39 | + } | ||
40 | + map $limited $limit { | ||
41 | + 1 $binary_remote_addr; | ||
42 | + 0 ""; | ||
43 | + } | ||
44 | + | ||
45 | + limit_req_zone $limit zone=limit_ufo:30m rate=20r/s; | ||
34 | 46 | ||
35 | 47 | ||
36 | sendfile on; | 48 | sendfile on; |
-
Please register or login to post a comment