Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4726

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

$
0
0

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.

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4726

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>