Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

or whatever.

How can I make this happen?

share|improve this question
up vote 4 down vote accepted

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

cookie SERVERID insert indirect
server webA cookie A check

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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