Welcome! Log In Create A New Profile

Advanced

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

Jader H. Silva
October 25, 2013 02:00PM
Hi,

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
$http_x_forwarded_for;}

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

Cheers
Jader H. Silva


2013/10/25 Brian08275660 <nginx-forum@nginx.us>

> 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:
> http://forum.nginx.org/read.php?2,244015,244123#msg-244123
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

Brian08275660 October 22, 2013 11:42PM

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

Francis Daly October 23, 2013 04:10AM

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

Brian08275660 October 23, 2013 08:56AM

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

Francis Daly October 23, 2013 12:54PM

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

Brian08275660 October 23, 2013 01:38PM

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

Brian08275660 October 23, 2013 11:38PM

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

Brian08275660 October 25, 2013 01:31PM

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

Jader H. Silva October 25, 2013 02:00PM

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

Brian08275660 October 25, 2013 05:14PM

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

Brian08275660 October 25, 2013 07:07PM

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

Francis Daly October 26, 2013 08:54AM

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

Brian08275660 October 26, 2013 09:38AM

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

unclepieman October 25, 2013 05:04PM

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

Brian08275660 October 25, 2013 05:17PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 205
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready