How to set Authorization header from request and send it to backend server - haproxy

Config file:

listen https_proxy
bind 0.0.0.0:443

http-request set-var(txn.authorization) hdr(Authorization)

use_backend node

backend node
option forwardfor
http-request add-header Authorization (txn.authorization)
http-response set-header Authorization hdr(Authorization)
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
server s1 0.0.0.0:8088 check

How can I pass Authorization header from request that I have set using set-var() to backend server as header.

Appreciate any help.
Thanks in advance.

Please share the complete configuration and explain the entire configuration that you are trying to achieve, there are almost certainly multiple errors and wrong assumption here, but without context it’s impossible to help.

Im sending request to haproxy with “Authorization” header. So this Authorization value header I want to send in backend as a header.

backend node
http-request add-header Authorization (value-of-request-header)

Then there is nothing for you to do. Haproxy will not remove any headers by default.