Hello all,
I’m trying to create redirect if java console redirect to my proxy url /redirect/something?host=host1
then it gets basically redirected to that host in url parameter. The problem is the backend server list is not static at all, new servers are added and removed all the time…
I would need something like this to work:
frontend customer_facing
mode http
bind <ip>:80
bind <ip>:443 ssl crt /etc/ssl/private/key.pem
http-request redirect scheme https unless { ssl_fc }
use_backend console_redirect if { path_beg /redirect }
backend console_redirect
mode http
use-server urlp(host) if { urlp(host) -m found } <-- this does not work
server test 127.0.0.1:80
I think I can use dataplane API to insert new server test2, server test3 etc into the config without reloading the whole haproxy… but I need the backend to choose correct server base on the host variable from URL…
So If i do https:///redirect/something?host=test it gets redirected to the server called “test” in the backend
I really need some help with this
4 posts - 2 participants