diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-10-26 09:32:03 +1100 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-10-26 09:32:03 +1100 |
commit | e0424fe6cc55eed3cc418e404c4e793f20618fcf (patch) | |
tree | aa072204adb3851a6e7e0670112ff4a266441d3d /include | |
parent | b67397861c75e8da465d2a730b1e75b6bd0a72ee (diff) | |
parent | 2030aea175d79494d4d3b69b10978d1ae37f4639 (diff) | |
download | volse-hubzilla-e0424fe6cc55eed3cc418e404c4e793f20618fcf.tar.gz volse-hubzilla-e0424fe6cc55eed3cc418e404c4e793f20618fcf.tar.bz2 volse-hubzilla-e0424fe6cc55eed3cc418e404c4e793f20618fcf.zip |
Merge pull request #100 from StefanKrauth/master
Better handling for SSL reverse proxy
Diffstat (limited to 'include')
-rwxr-xr-x | include/plugin.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/plugin.php b/include/plugin.php index 4d8405b62..c05e8f577 100755 --- a/include/plugin.php +++ b/include/plugin.php @@ -505,17 +505,12 @@ function script_path() { else $scheme = 'http'; - if(x($_SERVER,'SERVER_NAME')) { - $hostname = $_SERVER['SERVER_NAME']; + if(x($_SERVER,'HTTP_HOST')) { + $hostname = $_SERVER['HTTP_HOST']; } else { return z_root(); } - - if(x($_SERVER,'SERVER_PORT') && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) { - $hostname .= ':' . $_SERVER['SERVER_PORT']; - } - return $scheme . '://' . $hostname; } |