0

I am trying to route requests to different backends based on the existence of an URL param. I tried the following, but it never matches, even if my request contains a host param, e.g. POST http://127.0.0.1/result?build=2021041601&host=foo123:

acl has_host_urlparam urlp(host)
use_backend backend-host if has_host_urlparam
default_backend backend-generic

Do I have to compare the value returned from urlp() with something to check for existence of the param?

1 Answer 1

3

Apparently, I was missing a flag to look for match existence:

acl has_host_urlparam urlp(host) -m found
use_backend backend-host if has_host_urlparam
default_backend backend-generic

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .