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

HTTP2 error on req.headers #56

Closed
abovedave opened this issue Jun 7, 2018 · 1 comment
Closed

HTTP2 error on req.headers #56

abovedave opened this issue Jun 7, 2018 · 1 comment
Assignees

Comments

@abovedave
Copy link

abovedave commented Jun 7, 2018

I think the req.headers object is slightly different in the Node 8 http2 module.

      if (req.headers.hasOwnProperty('x-forwarded-for')) {
                      ^

TypeError: req.headers.hasOwnProperty is not a function

Could this be if(req.headers['x-forwarded-for']) instead?

@abovedave
Copy link
Author

Possibly related: nodejs/node#6055

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants