Add support for https behind a reverse proxy using X-Forwarded-Proto