`redir` returning unexpected url

I wanna run caddy behind haproxy, to share port 443 with other programs.
As described here (https://github.com/mholt/caddy/issues/1493).

www .example.com:567 {
redir http s://example.com/
}

Visiting : http ://www.example.com/
Expected : http s://example.com/
But Returned : http s://example.com:567/

the “:567” is not expected.
What could i do?

【ignore the spaces in the url because new user’s post is limited】

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.