mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-27 17:28:39 +00:00
fix BASE_URL
This commit is contained in:
parent
a754e1c3f0
commit
984805649e
2 changed files with 14 additions and 7 deletions
|
@ -40,6 +40,8 @@ final class Tools
|
|||
*/
|
||||
public static function getPocheUrl()
|
||||
{
|
||||
$baseUrl = "";
|
||||
|
||||
$https = (!empty($_SERVER['HTTPS'])
|
||||
&& (strtolower($_SERVER['HTTPS']) == 'on'))
|
||||
|| (isset($_SERVER["SERVER_PORT"])
|
||||
|
@ -73,13 +75,15 @@ final class Tools
|
|||
}
|
||||
|
||||
// check if BASE_URL is configured
|
||||
if(BASE_URL != null && BASE_URL != '') {
|
||||
if(BASE_URL) {
|
||||
print_r(BASE_URL);
|
||||
$baseUrl = BASE_URL;
|
||||
} else {
|
||||
$baseUrl = 'http' . ($https ? 's' : '') . '://' . $host . $serverport;
|
||||
}
|
||||
|
||||
return $baseUrl . $scriptname;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
// Change this if not using the standart port for SSL - i.e you server is behind sslh
|
||||
@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 ('DEBUG_POCHE', FALSE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue