I am stuffing haproxy in front of 3 riak nodes with HTTP. I want the backend name and/or ip in the response headers. Something like:

X-Proxy-Backend: riak-1 10.0.0.1

or whatever.

How can I make this happen?

link|improve this question

feedback

1 Answer

up vote 0 down vote accepted

You can use the cookie function to add the serverid into your response. For example:

cookie SERVERID insert indirect
server webA 192.168.1.11:80 cookie A check

This will insert a cookie called SERVERID=A into the HTTP headers.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.