limit_req_zone: How to apply only to some requests containing some string in the URL?

Jader H. Silva jaderhs5 at
Fri Oct 25 17:58:40 UTC 2013


you could use a map that matches all cases to empty string and default
value as non-empty

map $arg_capacity $my_default_key{~*([2-9]|10)X ""; default

If it matches 2X to 10X, $my_default_key will be empty.

Jader H. Silva

2013/10/25 Brian08275660 <nginx-forum at>

> Hi Francis,
> Now I need to create a limit that acts if the parameter ("capacity") is
> empty (not provided). How do I do that? I can't find how to, at least not
> using "map".
> (If provided, the other rules will evaluate it and one of them will act
> according to the value).
> Thanks in advanced!
> Posted at Nginx Forum:
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list