mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-23 17:42:15 -05:00
fix #270 access from remote machine
Replacing SERVER_NAME with HTTP_HOST allows me to use Poche on remote machines
This commit is contained in:
parent
cd8a344156
commit
45e9e0f565
@ -53,12 +53,12 @@ class Tools
|
|||||||
|
|
||||||
$scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
|
$scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
|
||||||
|
|
||||||
if (!isset($_SERVER["SERVER_NAME"])) {
|
if (!isset($_SERVER["HTTP_HOST"])) {
|
||||||
return $scriptname;
|
return $scriptname;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'http' . ($https ? 's' : '') . '://'
|
return 'http' . ($https ? 's' : '') . '://'
|
||||||
. $_SERVER["SERVER_NAME"] . $serverport . $scriptname;
|
. $_SERVER["HTTP_HOST"] . $serverport . $scriptname;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function redirect($url = '')
|
public static function redirect($url = '')
|
||||||
|
Loading…
Reference in New Issue
Block a user