-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
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
better detection of forwarded / proxied HTTP protocol #2666
Conversation
Hi! Please make which headers are checked configurable; many people will not have blacklisted things like |
scratch that, as I see it's only being used for the proto and it really isn't that critical if that gets spoofed. |
fair enough, can be easily configured through express's application settings, however, what would the default behavior be?
happy to add that logic in.
as per your comment, and everything is spoof-able with headers :)
I was studying I reviewed this means that |
Correct, but there is no reason it cannot be expanded. The reason it's called |
👍 PR coming up :) |
absolutely not true; reading of the headers is disabled in express by default and enabling the feature means you are saying you definitely trust the ALSO I have seen your avatar around (and even spoke with Mashape a few times), and if you are interested in joining jshttp, let me know offline and we can discuss :) Typically, to keep the codebase of Express from becoming a giant monolith, we divide functionality into the hierarchy |
P.S. the |
right, I meant on the HTTP/network layer spoofing occurs, we're still using
absolutely, I had added a simple regex-based filtering of ips in
👍 fully agreed, its good to get a conversation like this started, even if a PR gets closed / discarded, then move on to make the appropriate changes elsewhere as needed. be happy to contribute my time to |
haha, that's what I figured ;)
Just email me and I would love to set something up to speak with you and really want to connect to grow these types of modules in Node.js :) |
another quick typing issue, i was thinking of "addresses" but defaulted to just typing "ips" :) |
(FYI for future readers) as per discussion above, a PR to update the functionality of |
5f268a4
to
9848645
Compare
while
X-Forwarded-Proto
is the defacto-standard, it is not actually a standard, and there has been many other alternative headers used that serve the same purpose, from the common (e.g.X-Real-Proto
) to the obscure (e.g.cf-visitor
) etc ...forwarded-http
handles all the commen headers as well as the less common ones, in addition to (and most importantly) defaulting to theRFC 7239
standard.