Port Lost on frontend with 302 redirect

Hi all.

I’m trying to proxy an internal server with OWA installed.

this is my haproxy config


  • set-dumpable*

  • user nobody*

  • group nogroup*

  • log stdout local0*

  • strict-limits*

  • h1-case-adjust cache-control CaChE-CoNtRoL*

  • mode http*

  • log local0*

  • timeout client 5s*

  • timeout server 5s*

  • timeout connect 5s*

  • option redispatch*

  • option httplog*

  • SlowLoris Attack*

  • timeout http-request 5s*

  • option http-buffer-request*

frontend owa_frontend

  • bind :8400 ssl crt /opt/certs/Owa.pem ssl-min-ver TLSv1.1 *
  • option forwardfor*
  • http-request add-header X-Forwarded-Proto https if { ssl_fc }*
  • mode http*
  • default_backend be_main_10000*

backend be_main_10000

  • retry-on all-retryable-errors*
  • retries 3*
  • option forwardfor*
  • http-request add-header X-Forwarded-Port %[dst_port]*
  • http-request add-header X-Forwarded-Proto https if { ssl_fc }*
  • server server_10000 ssl verify none*

The frontend listens on and the Exchange OWA listens on
When I acces to my haproxy instance “” I loose the port on the frontend


curl -ikv

------ (cut a lot of stuff) -----
Object moved to href=“”>

The port is lost, so I cannot access (I have to manually put the “:8400” to get it work).
Is it possible to “force” that 302 redirection to not affect the URL ?

Thanks !