I am running HAProxy that is receiving layer 4 proxy protocol from an upstream source. I have a need to create a custom HTTP header with the address contained there. I can't seem to find how I can reference that TCP header.
Below is a sample of what I am trying to do:
frontend http_in
bind *:1025 accept-proxy
mode http
default_backend http_out
backend http_out
mode http
http-request set-header X-Custom-Header %[<ip from proxy protocol header>]
server some-server some-server:80
How can I make sure I am populating the new header with the address from the L4 header and not some spoofable http header?