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?

October 25, 2013 05:14PM
Hi Jader,

Thanks a lot, that looks like a nice solution!

I barely know how to build regex expressions, and I'm too lazy to learn just right now. Just a final question: Actually they will send me any value from 2X to 25X, but that could even increase to more than 25. I would like a simpler and more open REGEX, something like:

If it is something that includes an "X"

I will use it as this:

map $arg_capacity $my_default_key{ If it is something that includes an "X" ""; default $http_x_forwarded_for;}

Simple as that. This would catch any case, from 2X to 1000000000X. Actually it would catch even illegal values. But that is not a problem for me, cause in my java code that follows Nginx I'm validating the value they send me anyway, so I don't mind if they send me a value like "-1X" because my app would return an error status code and force them to send me a valid value anyway. The important thing is that Nginx should apply the limit if the received value is not empty, and asking if it contains an "X" covers that boolean question.
SubjectAuthorPosted

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

Brian08275660October 22, 2013 11:42PM

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

Francis DalyOctober 23, 2013 04:10AM

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

Brian08275660October 23, 2013 08:56AM

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

Francis DalyOctober 23, 2013 12:54PM

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

Brian08275660October 23, 2013 01:38PM

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

Brian08275660October 23, 2013 11:38PM

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

Brian08275660October 25, 2013 01:31PM

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

Jader H. SilvaOctober 25, 2013 02:00PM

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

Brian08275660October 25, 2013 05:14PM

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

Brian08275660October 25, 2013 07:07PM

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

Francis DalyOctober 26, 2013 08:54AM

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

Brian08275660October 26, 2013 09:38AM

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

unclepiemanOctober 25, 2013 05:04PM

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

Brian08275660October 25, 2013 05:17PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 42
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 156 on March 20, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready