thingdom / node-neo4j

[RETIRED] Neo4j graph database driver (REST API client) for Node.js
Apache License 2.0
925 stars 135 forks source link

can I access response headers #190

Open liorg2 opened 8 years ago

liorg2 commented 8 years ago

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

aseemk commented 8 years ago

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.)

liorg2 commented 8 years ago

thanks for answering so quickly! i'm using HAProxy to set the header

aseemk commented 8 years ago

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: