Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4723

Rule using even/odd from uri query parameter

$
0
0

@tiagocruz wrote:

Hello!

I would like to set some rules about query parameter URL, based on odd/even for example:

$ curl -I 'localhost:10001/test/?id=1' #  use one backend
$ curl -I 'localhost:10001/test/?id=2' #  user another backend

I can get the ID using

acl has_id urlp(id) -m bool

But I can't use even function, I did't understood the docs :frowning:

Also, I'm able to compare the id with some number, like this:

acl has_id urlp(id) -m int ge 666

But can't see if is odd or even.

I also tried to use path_reg but this not works with uri, only with path.

Can you please help me?

Thanks!

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4723

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>