aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDmitry Sandalov <dmitry@sandalov.org>2013-11-05 12:13:55 +0300
committerDmitry Sandalov <dmitry@sandalov.org>2013-11-05 12:13:55 +0300
commit45e9e0f5653993d5f463209691953e7a41527267 (patch)
tree4a9a1a30ec7bb5308b98d4b2003eba02b2079ccc
parentcd8a3441561fa63b9da1b705c4b28dee787f79b0 (diff)
downloadwallabag-45e9e0f5653993d5f463209691953e7a41527267.tar.gz
wallabag-45e9e0f5653993d5f463209691953e7a41527267.tar.zst
wallabag-45e9e0f5653993d5f463209691953e7a41527267.zip
fix #270 access from remote machine
Replacing SERVER_NAME with HTTP_HOST allows me to use Poche on remote machines
-rw-r--r--inc/poche/Tools.class.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 1d092823..030d75ba 100644
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -53,12 +53,12 @@ class Tools
53 53
54 $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); 54 $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
55 55
56 if (!isset($_SERVER["SERVER_NAME"])) { 56 if (!isset($_SERVER["HTTP_HOST"])) {
57 return $scriptname; 57 return $scriptname;
58 } 58 }
59 59
60 return 'http' . ($https ? 's' : '') . '://' 60 return 'http' . ($https ? 's' : '') . '://'
61 . $_SERVER["SERVER_NAME"] . $serverport . $scriptname; 61 . $_SERVER["HTTP_HOST"] . $serverport . $scriptname;
62 } 62 }
63 63
64 public static function redirect($url = '') 64 public static function redirect($url = '')