forked from wallabag/wallabag
fix BASE_URL
This commit is contained in:
@ -40,6 +40,8 @@ final class Tools
|
|||||||
*/
|
*/
|
||||||
public static function getPocheUrl()
|
public static function getPocheUrl()
|
||||||
{
|
{
|
||||||
|
$baseUrl = "";
|
||||||
|
|
||||||
$https = (!empty($_SERVER['HTTPS'])
|
$https = (!empty($_SERVER['HTTPS'])
|
||||||
&& (strtolower($_SERVER['HTTPS']) == 'on'))
|
&& (strtolower($_SERVER['HTTPS']) == 'on'))
|
||||||
|| (isset($_SERVER["SERVER_PORT"])
|
|| (isset($_SERVER["SERVER_PORT"])
|
||||||
@ -72,14 +74,16 @@ final class Tools
|
|||||||
$serverport = '';
|
$serverport = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if BASE_URL is configured
|
// check if BASE_URL is configured
|
||||||
if(BASE_URL != null && BASE_URL != '') {
|
if(BASE_URL) {
|
||||||
$baseUrl = BASE_URL;
|
print_r(BASE_URL);
|
||||||
} else {
|
$baseUrl = BASE_URL;
|
||||||
$baseUrl = 'http' . ($https ? 's' : '') . '://' . $host . $serverport;
|
} else {
|
||||||
}
|
$baseUrl = 'http' . ($https ? 's' : '') . '://' . $host . $serverport;
|
||||||
|
}
|
||||||
|
|
||||||
return $baseUrl . $scriptname;
|
return $baseUrl . $scriptname;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -31,6 +31,9 @@
|
|||||||
// Change this if not using the standart port for SSL - i.e you server is behind sslh
|
// Change this if not using the standart port for SSL - i.e you server is behind sslh
|
||||||
@define ('SSL_PORT', 443);
|
@define ('SSL_PORT', 443);
|
||||||
|
|
||||||
|
// Define this only if you use wallabag behind a proxy and if you encounter problems
|
||||||
|
@define ('BASE_URL', '');
|
||||||
|
|
||||||
@define ('MODE_DEMO', FALSE);
|
@define ('MODE_DEMO', FALSE);
|
||||||
@define ('DEBUG_POCHE', FALSE);
|
@define ('DEBUG_POCHE', FALSE);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user