diff options
Diffstat (limited to 'index.php')
-rwxr-xr-x | index.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -463,7 +463,7 @@ if (isset($_POST['login'])) | |||
463 | // You can append $_SERVER['SCRIPT_NAME'] to get the current script URL. | 463 | // You can append $_SERVER['SCRIPT_NAME'] to get the current script URL. |
464 | function serverUrl() | 464 | function serverUrl() |
465 | { | 465 | { |
466 | $https = (!empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS'])=='on')) || $_SERVER["SERVER_PORT"]=='443'; // HTTPS detection. | 466 | $https = (!empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS'])=='on')) || $_SERVER["SERVER_PORT"]=='443' || (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'); // HTTPS detection. |
467 | $serverport = ($_SERVER["SERVER_PORT"]=='80' || ($https && $_SERVER["SERVER_PORT"]=='443') ? '' : ':'.$_SERVER["SERVER_PORT"]); | 467 | $serverport = ($_SERVER["SERVER_PORT"]=='80' || ($https && $_SERVER["SERVER_PORT"]=='443') ? '' : ':'.$_SERVER["SERVER_PORT"]); |
468 | return 'http'.($https?'s':'').'://'.$_SERVER['SERVER_NAME'].$serverport; | 468 | return 'http'.($https?'s':'').'://'.$_SERVER['SERVER_NAME'].$serverport; |
469 | } | 469 | } |