Heroku SSL support: fixes after code review of @svanharmelen