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

X-Forwarded-For or X-Real-Ip support? #17

Open
dawnerd opened this issue May 16, 2021 · 1 comment
Open

X-Forwarded-For or X-Real-Ip support? #17

dawnerd opened this issue May 16, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dawnerd
Copy link

dawnerd commented May 16, 2021

Heya, this project looks great so gave it a shot, tossed it behind a reverse proxy and turns out it doesn't grab the correct IP - less than ideal. Just wondering if those headers could be checked as well instead of just relying on RemoteAddr

@9seconds
Copy link
Owner

Hey! Yes, sure, this is absolutely possible. Take a look: https://github.com/9seconds/topographer/blob/master/main.go#L68-L82 an instance of Topographer is http.Handler so if you use it as a library, you can already wrap it in some middleware. But CLI app does not have it, you are right. I'll implement it this week.

@9seconds 9seconds self-assigned this May 18, 2021
@9seconds 9seconds added enhancement New feature or request good first issue Good for newcomers labels May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants