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

req.secure: check first comma-delimited protocol #1646

Closed
wants to merge 1 commit into from
Closed

req.secure: check first comma-delimited protocol #1646

wants to merge 1 commit into from

Conversation

jonathanong
Copy link
Member

Currently, my request headers look like this:

  'x-forwarded-for': '24.205.165.76,127.0.0.1',
  'x-forwarded-proto': 'https,http',
  'x-forwarded-port': '32220' 

But this doesn't work with req.secure as it currently assumes there's only one proxy.

Also, there are no tests for req.secure, so I don't know how to add a test.

@jonathanong
Copy link
Member Author

i don't know if this introduces security risks (i don't know enough about proxies).

@visionmedia if this is the correct way to fix this, you would also want to fix https://github.com/senchalabs/connect/blob/master/lib/middleware/cookieSession.js#L94

@tj
Copy link
Member

tj commented Jun 5, 2013

yeah you're right, I'll add some tests and soften the whitespace restriction

@tj tj closed this in 8ab4408 Jun 5, 2013
@jonathanong jonathanong deleted the secure-check-proxy branch June 5, 2013 19:27
@jonathanong
Copy link
Member Author

same fix is required in connect's cookie session. not sure where else.

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

Successfully merging this pull request may close these issues.

2 participants