coding style
This commit is contained in:
parent
3e383dbb92
commit
8033346cf8
|
@ -495,7 +495,8 @@ function getBaseURL($abs = null)
|
|||
|
||||
//split hostheader into host and port
|
||||
if (isset($_SERVER['HTTP_HOST'])) {
|
||||
if ((!empty($conf['trustedproxy'])) && isset($_SERVER['HTTP_X_FORWARDED_HOST']) && preg_match('/'.$conf['trustedproxy'].'/', $_SERVER['REMOTE_ADDR'])) {
|
||||
if ((!empty($conf['trustedproxy'])) && isset($_SERVER['HTTP_X_FORWARDED_HOST'])
|
||||
&& preg_match('/' . $conf['trustedproxy'] . '/', $_SERVER['REMOTE_ADDR'])) {
|
||||
$cur_host = $_SERVER['HTTP_X_FORWARDED_HOST'];
|
||||
} else {
|
||||
$cur_host = $_SERVER['HTTP_HOST'];
|
||||
|
@ -540,7 +541,9 @@ function getBaseURL($abs = null)
|
|||
function is_ssl()
|
||||
{
|
||||
// check if we are behind a reverse proxy
|
||||
if ((!empty($conf['trustedproxy'])) && isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && preg_match('/'.$conf['trustedproxy'].'/', $_SERVER['REMOTE_ADDR']) && ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
|
||||
if ((!empty($conf['trustedproxy'])) && isset($_SERVER['HTTP_X_FORWARDED_PROTO'])
|
||||
&& preg_match('/' . $conf['trustedproxy'] . '/', $_SERVER['REMOTE_ADDR'])
|
||||
&& ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue