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

Adding port to header host

$
0
0

Dear All,
I would like to add port to the incoming Host request header if that not included it.
I think I have managed to solve the problem in the way mentioned below. I just would like to ask for the experienced veterans is there any problem with this solution or is there any easier one?

acl port_exists req.fhdr(Host) -m sub “:”
http-request set-var(req.h_host) req.fhdr(Host),lower
http-request set-header Host %[var(req.h_host)]:%[dst_port] if !port_exists

Thank you very much!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4832

Trending Articles



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