diff options
author | lisps <stummp@loewen.de> | 2014-09-26 12:48:02 +0200 |
---|---|---|
committer | lisps <stummp@loewen.de> | 2014-09-26 12:48:02 +0200 |
commit | 8d39e80d363eda2ef31dac8473bfdab4b9cd7ce5 (patch) | |
tree | 7bab1caccbc0de7c30f0e610d1e5ee9b3c67d564 /inc/init.php | |
parent | 115aab0f5fca76360c50f759f587229ff327105d (diff) | |
parent | 7b950f2d59050052c1d9251b0bd9bd40c7441040 (diff) | |
download | rpg-8d39e80d363eda2ef31dac8473bfdab4b9cd7ce5.tar.gz rpg-8d39e80d363eda2ef31dac8473bfdab4b9cd7ce5.tar.bz2 |
Merge remote-tracking branch master into revisions
Diffstat (limited to 'inc/init.php')
-rw-r--r-- | inc/init.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/inc/init.php b/inc/init.php index 4ff239787..d825b5250 100644 --- a/inc/init.php +++ b/inc/init.php @@ -456,10 +456,6 @@ function getBaseURL($abs=null){ $port = ''; } - if(!$port && isset($_SERVER['SERVER_PORT'])) { - $port = $_SERVER['SERVER_PORT']; - } - if(is_null($port)){ $port = ''; } @@ -490,6 +486,14 @@ function getBaseURL($abs=null){ * @returns bool true when SSL is active */ function is_ssl(){ + // check if we are behind a reverse proxy + if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) { + if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') { + return true; + } else { + return false; + } + } if (!isset($_SERVER['HTTPS']) || preg_match('/^(|off|false|disabled)$/i',$_SERVER['HTTPS'])){ return false; |