Add support for HTTPS frontend and HTTP backend
Imagine this scenario:
|INTERNET| --- HTTPS ---> |Proxy Server| --- HTTP ---> |GNU Social Server|
You have a server responding HTTPS (a load balancer for example) and a backend server with GNU Social but using only HTTP. With current code, the page cannot manage these scenario.
In these cases the proxy server sends the X-FORWARDED-PROTO header.
Please add some like the following code to fix it:
if (isset ($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == "https" ) $_SERVER['HTTPS'] = 'on';
I put this in index.html and works very well, but I think that must be in isHTTPS function.