Welcome! Log In Create A New Profile

Advanced

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

October 22, 2013 11:42PM
Hi,

I'm using the limit_req_zone module. I would like it to act only on some requests that have a certain string in one variable in the query string of the URL.For example, lets say that I'm providing a IP geolocation service, and that in the URL there is a query string like this:

http://api.acme.com/ipgeolocation/locate?key=NANDSBFHGWHWN2X&ip=146.105.11.59

I would like the rule to detect when the "key" parameter ends with "2X", and in such case to apply the limitation.
What I really need is to give NGINX a secret message. The "key" parameter would end in "01X", "02X", "03X" (etc). This would indicate Nginx the limitation of queries per minute, and Nginx would apply a different rate for each request, depending on the "message".

Is there a way to do that?

Thanks in advance!
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: 90
Record Number of Users: 5 on December 17, 2014
Record Number of Guests: 154 on December 17, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready