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

Pass X-Forwarded-For header from http requests into logs #659

Closed
wf1nder opened this issue Jul 29, 2020 · 3 comments
Closed

Pass X-Forwarded-For header from http requests into logs #659

wf1nder opened this issue Jul 29, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@wf1nder
Copy link

wf1nder commented Jul 29, 2020

We using http reverse proxy in front of some VM components. As a result, VM writing into logs proxy's address, instead of original client address, which sometimes makes it difficult to debug. Proxy passing original address in standard X-Forwarded-For header, but it looks like VM ignores it.

I suggest to support X-Forwarded-For header. If it presents in request, use its value in logs as client address, or write it as additional filed in logs.

@valyala valyala added the enhancement New feature or request label Jul 29, 2020
@valyala
Copy link
Collaborator

valyala commented Jul 29, 2020

Added X-Forwarded-For header in error messages in the following commits:

These commits will be included in the next release.

@valyala
Copy link
Collaborator

valyala commented Jul 30, 2020

The X-Forwarded-For header has been added to error logs starting from v1.39.2. Closing the feature request as done.

@valyala
Copy link
Collaborator

valyala commented Aug 5, 2020

FYI, the X-Forwarded-For request header is shown at /api/v1/status/active_queries page starting from v1.39.3. This should simplify detecting clients that send heavy queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants