Fix for http->https redirection on AppHarbor.
AppHarbor SSL stops at the load balancer, and we need to use a special header to detect it.
See: http://support.appharbor.com/kb/tips-and-tricks/ssl-and-certificates