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

Using X-Forwarded-For to check for external request #176

Open
Dainii opened this issue Aug 28, 2023 · 0 comments
Open

Using X-Forwarded-For to check for external request #176

Dainii opened this issue Aug 28, 2023 · 0 comments

Comments

@Dainii
Copy link

Dainii commented Aug 28, 2023

Description

There is a mechanism to prevent external queries to reach the metrics endpoints based on the presence or not of the X-Forwarded-Host header. Would it be possible to also check the presence of the X-Forwarded-For header (very often used when an application runs behind a reverse proxy) ?

We do not use the X-Forwarded-Host anywhere because the Host header is never changed.

Expected Behavior

Deny request when the DISABLE_EXTERNAL_ACCESSenv is set and the X-Forwarded-For header present in the request.

Actual Behavior

It only checks the presence of the X-Forwarded-Host header.

Environment

  • Operating system: all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant