substack/ploy — pull request #14 by natesilva (2013-09-03 14:13:00+00:00)
Title: add X-Forwarded headers to the proxy request

Currently an app (branch) running under ploy does not know the IP address of the caller, or if SSL/TLS is being used. For example, `req.connection.remoteAddress` is always 127.0.0.1. That makes logging pretty useless.

The common way to handle this is for the proxy to add `X-Forwarded-For` and `X-Forwarded-Proto` headers.

With these headers, the app can detect if https was used, and the actual IP address of the caller.