HAProxy community

Browser request URL changin

Need some help with haproxy rewrite rules.

How it works

  1. https request sent to AWS application load balancer (e.g. https://abc.com)
  2. AWS alb send the request to the haproxy which listens to port 80
  3. haproxy serves the request

the issue here is when I access the url (e.g. https://abc.com) it loads, when I login to the page the browser url changes to https://abc.com:8888 (port 8888 which is the backend server port)

how do I make sure that haproxy doesn’t add port to the request url

following are some configs that I tried

http-request replace-value Host (.*):8888 \1
http-request replace-value Host (.*):.* 1
acl app_port dst_port 8888
http-request redirect location https://%[req.hdr(Host)]%[capture.req.uri] if app_port

nothing worked

any help would be appreciated