nginx: rate limiting only on proxy protocol
This commit is contained in:
parent
558debc1cb
commit
64bea5387b
3 changed files with 10 additions and 4 deletions
|
@ -42,7 +42,9 @@ location /v1/ {
|
|||
|
||||
client_max_body_size 20G;
|
||||
|
||||
#limit_req zone=api burst=5 nodelay;
|
||||
if ($ratelimit) {
|
||||
limit_req zone=api burst=5 nodelay;
|
||||
}
|
||||
}
|
||||
|
||||
location /c1/ {
|
||||
|
@ -54,7 +56,9 @@ location /c1/ {
|
|||
proxy_read_timeout 2000;
|
||||
proxy_temp_path /var/log/nginx/proxy_temp 1 2;
|
||||
|
||||
#limit_req zone=api burst=5 nodelay;
|
||||
if ($ratelimit) {
|
||||
limit_req zone=api burst=5 nodelay;
|
||||
}
|
||||
}
|
||||
|
||||
location /static/ {
|
||||
|
|
Reference in a new issue