spumko/hapi — pull request #1747 by stongo (2014-06-30 18:45:23+00:00)
Title: Read X-Forwarded-Proto header if trustProxy flag set

If hapi is behind a reverse proxy that sets a X-Forwarded-Proto header, a relative redirect is unable to use it. Creates an issue when hapi i is running on http behind a https reverse proxy - redirects go to http instead of https.

This PR adds a trustProxy flag to server.settings and uses the X-Forwarded-Proto header if it exists when setting baseURI