Welcome! Log In Create A New Profile

Advanced

nginx - rate limit by argument value

Posted by lalala 
nginx - rate limit by argument value
March 01, 2018 03:00AM
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?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 170
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready