garbados/flask-browserid — pull request #21 by mreid-moz (2014-09-26 13:01:08+00:00)
Title: Consult the "X-Forwarded-Proto" header.

This allows this code to work behind a proxy or load balancer,
where the actual client URI scheme is https, but the webapp sees
it as http.

"X-Forwarded-Proto" is the standard header used by Amazon ELB (and probably others) to pass this information along.