Enabling the Request object to generate the correct scheme for SSL URI 

Enabling the Request object to generate the correct scheme for SSL URI  requests to a web server through an HTTP proxy or load balancer.

HTTP_X_FORWARDED_PROTO request header is sent by load balancers instead of HTTPS to indicate the URI was requested via a secure connection.

An example of this usage is Amazon Elastic Beanstalk applications which can sit behind a load balancer (when autoscaling)