Modify requested URL

Dear all,

I’m running haproxy on an opnsense system, which works fine.As one backend I’m using xwiki. This system is on part 8080.
All is working fine to have access through the frontend with https//wiki.mydomian.com.
All http request are redirected to https (443) . Also the ssl certificate is properly in place

However there is one strange thing: In the case the user has forgotten the password he gets an email after filling like this
https://wiki.mydomain.com:80/bin/view/XWiki/ResetPasswordComplete?u=
The strange thing is the https at the beginning, which is correct and the port :80 at the end.

The browser reports an error like : SSL_ERROR_RX_RECORD_TOO_LONG

If I manually delte the “:80” from the link all is working fine.

How can I modify/rewrite the requested url and delte the :80

Any help is appreciated

This worked for me:
In the frontend (advanced mode= in the sectio Option pass-through
add:
http-request replace-value Host (.*):80 \1:443

I remember readed in some RFC that the port after the hostname is optional, but the facto standard is to avoid it, nowadays in 443 too.

There are some questions about this subject before, the accepted way seems:

http-request set-header host %[hdr(host),field(1,:)]