Trick PHP into thinking SSL/HTTPS is on

By , 2014-10-15 08:53

Not sure of the implications of this/best practices, but I just added

$_SERVER['HTTPS'] = 'on';

to my index.php.

Reason for this is that I am running a php app behind a reverse proxy, with the connection between the app server and the reverse proxy being plain HTTP, but the connection between the client and the reverse proxy is HTTPS.


								

Leave a Reply

 

Custom theme by me. Based on Panorama by Themocracy