Get rid of "Undefined array key "HTTP_X_FORWARDED_PROTO"" warning

This commit is contained in:
nathan 2023-07-14 10:58:53 -06:00
parent 604a12f7e6
commit 0c9cb71a70

View File

@ -60,10 +60,10 @@ class Http
static function schema()
{
return !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ||
$_SERVER['SERVER_PORT'] == 443 ||
!empty($GLOBALS['egw_info']['server']['enforce_ssl']) ||
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ?
'https' : 'http';
$_SERVER['SERVER_PORT'] == 443 ||
!empty($GLOBALS['egw_info']['server']['enforce_ssl']) ||
isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ?
'https' : 'http';
}
/**