can I access response headers
liorg2 opened this issue · 3 comments
hi,
im trying to find a way to access response headers in order to log the server ip, which can be one of all cluster's servers
Hey @liorg2, good question; the response headers indeed aren't exposed right now.
We can look into ways of exposing them, but in the meantime, can you describe your setup a bit? E.g. are you using a load balancer in front of your cluster? HAProxy? If not, who is adding the IP address as a header on the response? (Neo4j doesn't natively, I don't believe.)
thanks for answering so quickly! i'm using HAProxy to set the header
The good news, then, is that you can include the IP address in your HAProxy logs!
http://blog.haproxy.com/2012/10/29/haproxy-log-customization/
We log a bunch of things like this in our HAProxy logs:
- Web server IP address
- "Pool" (write or read)
- Neo4j server (we use hostname instead of IP address for easier consumption)
- Custom headers like short query name