Quantcast
Channel: Serverphorums.com - HAProxy
Viewing all articles
Browse latest Browse all 5112

http-send-name-header for response? (3 replies)

$
0
0
Hi Folks,

Given a setup where I have a backend like so:

backend production
balance roundrobin
hash-type consistent
http-check expect status 200
option httpchk GET /\ HTTP/1.1\r\nHost:\
myhost.net\r\nUser-agent:\ healthcheck\r\nConnection:\ close
server prod_1 192.168.1.10:80 weight 50 maxconn 150 check inter 1m
server prod_2 192.168.1.20:80 weight 50 maxconn 150 check inter 1m
server prod_3 192.168.1.30:80 weight 50 maxconn 150 check inter 1m

I'd like to report which of the servers handled this particular request,
by way of HTTP response header. For a variety of reasons, this isn't best
done by the backend servers themselves.

I was eager to try this:

http-send-name-header Origin-Server

but it appears this sends the name to the backend as a request header. Is
there a similar feature that will do this with a response header, or some
combination of http-response set-header that will perform the equivalent?
I'm looking to return (to the frontend and then on the client) something
like

Origin-Server: prod_2

Best Regards,
Mark Staudinger

Viewing all articles
Browse latest Browse all 5112

Trending Articles