Quantcast
Channel: Nginx Forum - Other discussion
Viewing all articles
Browse latest Browse all 972

limit_req for a url

$
0
0
I like to limit_req for a url ex. http://mysite.com/index.php?show=list&search=whatever

if someone request somthing that have show=list
I like to have a limit like max 1 request every sec.

bin trying something like this but I can get it to work. with out it takes all like show=item

http{
map $arg_show $list_limit {
default $binary_remote_addr;
}
limit_req_zone $arg_index zone=one:10m rate=1r/s;

server {
limit_req zone=one burst=5;
}

}

Viewing all articles
Browse latest Browse all 972

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>