Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

nginx - rate limit by argument value

$
0
0
First let me tell you that I'm new to nginx. I'm trying to limit request by arguments in uri.

localhost/?argId=1
localhost/?argId=2
localhost/?argId=3

----------------
nginx.conf

http {
...
limit_req_zone $arg_argId zone=mylimit:10m rate=1r/m;
...
server {
...

location / {
root html;
index index.html index.htm;

limit_req zone=mylimit;
}
...
----------------

I tried it with $request_uri but still not working. Request are treated as same. Any suggestions?

Viewing all articles
Browse latest Browse all 4759

Trending Articles