Support for X-Forwarded-Proto style HTTPS indicators, closes #1345