diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-04-07 15:44:05 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-04-07 15:44:05 +0200 |
commit | 69c57493e758ec71380fb04accc223bd169be51c (patch) | |
tree | 649325463b568d08824e4aba2d0a0e2b083571a1 /inc | |
parent | 5fe19480977a5b063769d1a3b3dce168873d4c8a (diff) | |
download | wallabag-69c57493e758ec71380fb04accc223bd169be51c.tar.gz wallabag-69c57493e758ec71380fb04accc223bd169be51c.tar.zst wallabag-69c57493e758ec71380fb04accc223bd169be51c.zip |
[fix] with some config, http host is different
Diffstat (limited to 'inc')
-rwxr-xr-x | inc/poche/Tools.class.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index a130e94b..7f064020 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php | |||
@@ -59,8 +59,10 @@ class Tools | |||
59 | return $scriptname; | 59 | return $scriptname; |
60 | } | 60 | } |
61 | 61 | ||
62 | $host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'])); | ||
63 | |||
62 | return 'http' . ($https ? 's' : '') . '://' | 64 | return 'http' . ($https ? 's' : '') . '://' |
63 | . $_SERVER["HTTP_HOST"] . $serverport . $scriptname; | 65 | . $host . $serverport . $scriptname; |
64 | } | 66 | } |
65 | 67 | ||
66 | public static function redirect($url = '') | 68 | public static function redirect($url = '') |