Fix support for SSL for proxied sites, or otherwise uncertain situations

My particular situation is deployed through ElasticBeanstalk, proxying
HTTPS to HTTP on the actual endpoints. This makes flask think that it is
only running with http, not https