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

Redirect rule adds colon and port number into URL

$
0
0

I have a rule in HAProxy (v.2.4.8) that adds a folder at the beginning of the path of certain URLs. e.g.:

http-request redirect location https://%[hdr(host)]%/folder%[path] code 301 if { path_beg /files }

This works fine, but there’s a strange glitch. If the backend the traffic is sent to a server listening on port 80, it works. If it’s sent to a server listening on port 8080, it adds in the port number, after a colon, and fails. So instead of:

https://example2.com/folder/files

I get:

https://example2.com:8080/folder/files

I’m not sure why this is happening, or how to troubleshoot this. Is there an obvious reason, and, if not, is there an easy way of changing my rule so that it strips out any colon and port number?

Thanks!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



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