Oh, ok. Then it is similar to REGEX in Java.
Well, then I think I have a nice and elegant solution, Thanks!
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,244015,244149#msg-244149
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.o
On Fri, Oct 25, 2013 at 07:07:20PM -0400, Brian08275660 wrote:
Hi there,
> ~*(.*)X
>
> I think that the first two characters mean "match anycase", then the "(.*)"
> would mean "any quantity of characters" and the "X" would mean that specific
> letter.
>
> Am I right?
Yes.
But unless you're go
I read some information about REGEX and think I found the way to express "X
or x, preceded with something before":
~*(.*)X
I think that the first two characters mean "match anycase", then the "(.*)"
would mean "any quantity of characters" and the "X" would mean that specific
letter.
Am I right?
Hi Payam,
I dont have that option. My users are not using real browsers, but objects
that model an HTTP client. Probably these object can't inject cookies. And I
don't want to ask them to so so, it would make things more complex to them,
whereas including an extra parameter in the query string is
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 mor
Maybe ive misunderstood but cant you very simply do this by injecting a cookie
on the origina req page and then have nginx match, count it and apply rates? Or
maybe im comicating it... If even possible
--
Payam Chychi
Network Engineer / Security Specialist
On Tuesday, October 22, 2013 at 8:4
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
> Hi Franc
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 a
Hi Francis,
Thanks a lot! You saved me probably a couple of days of research. It is
working now!
I did this:
The user will send my a "capacity" parameter, with a value of 2X or 3X or 4X
or..(etc)
map $arg_capacity $2X_key{~*2X $http_x_forwarded_for;default "";}
map $arg_capa
Thanks a lot Francis! Now I just have to learn how to use the custom
variables and the "map" directive. I haven't ever used them before, never
needed them.
By the way, it will be easier than what I thought. I decided to ask my users
to add an extra parameter, something like "&capacity=3X" instead
On Wed, Oct 23, 2013 at 08:56:33AM -0400, Brian08275660 wrote:
Hi there,
> Could you please give me an example? A few lines of code would be great!
Completely untested, but something like:
map $arg_key $key_ends_in_02X {
default "";
~02X$ "A";
}
(where "A" might be, for example, $b
Could you please give me an example? A few lines of code would be great!
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,244015,244035#msg-244035
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On Tue, Oct 22, 2013 at 11:42:35PM -0400, Brian08275660 wrote:
Hi there,
> 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.
> http://api.acme.com/ipgeolocation/locate?key=NANDSBFHGWHWN
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
14 matches
Mail list logo