add HTTP_X_FORWARDED_PROTO check to SSL detection (supports heroku ssl detection)