HAProxy community

Redirect with all headears

I want to redirect all requests from abc.com to xyz.com, here is my config:

redirect prefix https://xyz.com code 308 if { hdr(host) -i abc.com }

But headers are missing when request come to xyz.com. I want to keep all headers from client (for check auth, versioning, …) when request come to new endpoint (xyz.com), how can I do that?


You can’t. The browsers does what the browser wants, you cannot influence browser behavior from your end.