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 #1

Open
lucascaro opened this issue Jun 25, 2014 · 2 comments
Open

X-Forwarded-For #1

lucascaro opened this issue Jun 25, 2014 · 2 comments

Comments

@lucascaro
Copy link

Hey there!

I'm thinking about using this middleware to replace some access rules that are currently on nginx. This seems like a good solution and I'd like to discuss the possibility of adding support for the X-Forwarded-For headers (or others) set by a proxy or load balancer in order to do the filtering.

In our case, our remoteAddress will always be the one of the reverse proxy, but it will send the actual client address in the mentioned header.

What do you think would be the best way to add support for that to this middleware? I can offer my help to make it happen, but I'm interested in what you think would be the best solution.

Let me know.

Cheers,
Lucas.

@mattrobenolt
Copy link
Owner

My opinion was that another middleware should correct this. Messing with X-Forwarded-For is a bit sketchy if you don't do it right. Lemme see if I can either write one tonight, or find one that does what it should that I can recommend.

This middleware should work exactly like the nginx real_ip module if you're familiar with that.

@lucascaro
Copy link
Author

makes sense, thanks!

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

2 participants