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

document "trust proxy" settings #180

Closed
dougwilson opened this issue Aug 5, 2014 · 7 comments
Closed

document "trust proxy" settings #180

dougwilson opened this issue Aug 5, 2014 · 7 comments

Comments

@dougwilson
Copy link
Contributor

No description provided.

@crandmck
Copy link
Member

This implies that http://expressjs.com/guide.html#proxies is no longer accurate, or at least incomplete. Is that true?

@crandmck
Copy link
Member

Just found #152 which has pertinent discussion. Was the usage in the final comment what was actually implemented?

@dougwilson
Copy link
Contributor Author

This implies that http://expressjs.com/guide.html#proxies is no longer accurate, or at least incomplete. Is that true?

Correct, it is incomplete. app.enable('trust proxy') still works, but of course it doesn't explain how bad it is to do that if you don't understand how your proxy it actually setup (like in a hosting provider like AWS) or talks about all the different settings and how to set it up correctly with them.

Was the usage in the final comment what was actually implemented?

I think so, but I can't say 100%; I'd have to look at the code.

@dougwilson
Copy link
Contributor Author

example of why this needs documentation: expressjs/express#2307

@hacksparrow
Copy link
Member

@mohamedmohsin
Copy link

i enable trust proxy [ app.enable('trust proxy')],but my req.ips is an empty array

@dougwilson
Copy link
Contributor Author

@mohamedmohsin I'm 99% sure the reason is because you are accessing req.ips after the request has already completed (probably after you already responded to the request). At that point, Node.js no longer provides an IP address for the request, so req.ips will always be empty. If you need to continue this discussion, please submit an issue at https://github.com/strongloop/express/issues/new , send a message to the Express mailing group (https://groups.google.com/group/express-js), or hop on IRC (#express on freenode.net). This is just an issue for making the documentation for the API.

@expressjs expressjs locked and limited conversation to collaborators Oct 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants