Adding a check for HTTP_X_FORWARDED_PROTO in https_is_running()
This commit is contained in:
parent
e47ddb3d47
commit
fbbc070b39
|
@ -69,6 +69,10 @@ require_once('functions_io.php');
|
||||||
//}
|
//}
|
||||||
|
|
||||||
function https_is_running() {
|
function https_is_running() {
|
||||||
|
if(isset ($_SERVER['HTTP_X_FORWARDED_PROTO'])
|
||||||
|
&& $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (isset ($_SERVER['HTTPS'])
|
if (isset ($_SERVER['HTTPS'])
|
||||||
&& ($_SERVER['HTTPS'] === true
|
&& ($_SERVER['HTTPS'] === true
|
||||||
|| $_SERVER['HTTPS'] == 'on')) {
|
|| $_SERVER['HTTPS'] == 'on')) {
|
||||||
|
|
Loading…
Reference in New Issue