Answer the question
In order to leave comments, you need to log in
Why don't two limit_reqs work in different locations?
The problem is the following. I have nginx config
http {
limit_req_zone $binary_remote_addr zone=api_limit1:5m rate=1r/m;
limit_req_zone $binary_remote_addr zone=api_limit2:5m rate=1r/m;
server {
location = /api/user/ {
limit_req zone=api_limit2 nodelay;
# break;
add_header Set-Cookie "user=$user;Path=/;Max-Age=11111";
return 200;
}
location ~ ^/api/ {
limit_req zone=api_limit1 nodelay;
proxy_pass http://api_server;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question