Closed gtirloni closed 7 years ago
This is necessary to correctly work behind load balancers. In that case, $_SERVER['HTTPS'] is not defined because the TLS connection is terminated on the load balancer and only HTTP requests reach the application.
X-Forwarded-Proto is a defacto standard (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/x-forwarded-headers.html)
This is necessary to correctly work behind load balancers. In that case, $_SERVER['HTTPS'] is not defined because the TLS connection is terminated on the load balancer and only HTTP requests reach the application.
X-Forwarded-Proto is a defacto standard (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/x-forwarded-headers.html)