Adding support for HTTPS load-balancing

In order to support HTTPS load-balancing that is terminated at the load-balancer level, Hue needs to know that the request came through HTTPS. Django officially supports this by adding SECURE_PROXY_SSL_HEADER to the settings.py file and specifying the HTTP header (X-Forwarded-Protocol) to be set to https.

https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header

At the load-balancer level you need to set that HTTP header. Here is the HAProxy example:

reqadd X-Forwarded-Protocol:\ https