This commit is contained in:
qronald
2017-02-10 13:50:52 -04:00
parent 9101a84581
commit 854c211758

View File

@@ -45,19 +45,16 @@ class G
/** /**
* is_https * is_https
* @return void * @return bool
*/ */
public static function is_https() public static function is_https()
{ {
if (isset($_SERVER['HTTPS'])) { $is_http = false;
if ($_SERVER['HTTPS']=='on') { if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ||
return true; (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
} else { $is_http = true;
return false;
}
} else {
return false;
} }
return $is_http;
} }
/** /**