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

Support "Forwarded" header #1155

Closed
victorandree opened this issue Mar 6, 2018 · 1 comment
Closed

Support "Forwarded" header #1155

victorandree opened this issue Mar 6, 2018 · 1 comment

Comments

@victorandree
Copy link

The "Forwarded" header is the standardized replacement for X-Forwarded-For, X-Forwarded-Proto et cetera. If koa supports the latter, it should support the former when app.proxy = true.

  • X-Forwarded-For is currently used for ctx.ip. It should support (and prefer) Forwarded: for=192.168.0.1
  • X-Forwarded-Proto is currently used to determine protocol (for secure cookies). It should support (and prefer)Forwarded: proto=https

The forwarded-parse package can be used to parse the header, or it could be done in-house.

I could potentially write a PR for this if there's interest.

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

3 participants