koajs / koa

Expressive middleware for node.js using ES2017 async functions
https://koajs.com
MIT License
35.23k stars 3.23k forks source link

Support "Forwarded" header #1155

Closed victorandree closed 4 years ago

victorandree commented 6 years ago

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.

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.

jonathanong commented 4 years ago

https://github.com/koajs/koa/issues/281