Open Geod24 opened 3 years ago
Suggested header fields are only for HTTP, since we're moving towards to a RPC (and DNS on registry) based communication those fields still would not be enough. There is a newer protocol called Proxy Protocol that we can start to support. This protocol will still work with HTTP communications since it covers TCP communication basically.
In addition to that, we should provide a documentation about putting Agora behind a proxy to aid users about some configuration fields.
If someone wished to setup a reverse proxy in front of Agora, it would probably come crashing as soon as the
BanManager
would be involved, as it would end up banning the proxy. I suggest that we had a (configured) whitelist (we need a whitelisting mechanism for #1674 anyways) and handle https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For and https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded correctly.