diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-04-07 15:45:26 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-04-07 15:45:26 +0200 |
commit | a7f39918bf67f189e30381fbbde95184b2f618fa (patch) | |
tree | 649325463b568d08824e4aba2d0a0e2b083571a1 | |
parent | 5fe19480977a5b063769d1a3b3dce168873d4c8a (diff) | |
parent | 69c57493e758ec71380fb04accc223bd169be51c (diff) | |
download | wallabag-a7f39918bf67f189e30381fbbde95184b2f618fa.tar.gz wallabag-a7f39918bf67f189e30381fbbde95184b2f618fa.tar.zst wallabag-a7f39918bf67f189e30381fbbde95184b2f618fa.zip |
Merge pull request #614 from wallabag/fix-host-getpocheurl
[fix] with some config, http host is different
-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 = '') |