Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can I access response headers #190

Open
liorg2 opened this issue Jan 25, 2016 · 3 comments
Open

can I access response headers #190

liorg2 opened this issue Jan 25, 2016 · 3 comments

Comments

@liorg2
Copy link

liorg2 commented Jan 25, 2016

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

@liorg2 liorg2 changed the title canI access response headers can I access response headers Jan 25, 2016
@aseemk
Copy link
Member

aseemk commented Jan 25, 2016

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
Copy link
Author

liorg2 commented Jan 25, 2016

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

@aseemk
Copy link
Member

aseemk commented Jan 25, 2016

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

@aseemk aseemk added this to the v2 redesign milestone Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants