Ticket #9240: mythweb-proxy-https.diff

File mythweb-proxy-https.diff, 634 bytes (added by Stuart Auchterlonie, 11 years ago)

lose the .txt extension so it looks like a patch

  • includes/defines.php

     
    101101    $_SERVER['HTTP_HOST'] = $host;
    102102    $_SERVER['HTTP_PORT'] = $port;
    103103
    104     if ($_SERVER['HTTP_PORT'] == '443' || $_SERVER['HTTP_PORT'] == '8443')
     104    if ($_SERVER['HTTP_PORT'] == '443' || $_SERVER['HTTP_PORT'] == '8443' || $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
    105105        $_SERVER['HTTPS'] = 'on';
    106106
    107107    $root_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';