1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-27 17:28:39 +00:00

Merge pull request #1226 from wallabag/MoriTanosuke-dev

Enable base_url for proxies
This commit is contained in:
Thomas Citharel 2015-07-29 11:43:22 +02:00
commit ef16095d62
3 changed files with 21 additions and 2 deletions

View file

@ -1,4 +1,11 @@
# what is wallabag ?
## About development
We are working on a technical rework, using Symfony 2. You can contribute to [this version here](https://github.com/wallabag/wallabag/tree/v2).
wallabag 1.x is still maintained but we won't develop new features.
## Description
wallabag is a self hostable application allowing you to not miss any content anymore. Click, save, read it when you can. It extracts content so that you can read it when you have time.
More informations on our website: [wallabag.org](http://wallabag.org)

View file

@ -40,6 +40,8 @@ final class Tools
*/
public static function getPocheUrl()
{
$baseUrl = "";
$https = (!empty($_SERVER['HTTPS'])
&& (strtolower($_SERVER['HTTPS']) == 'on'))
|| (isset($_SERVER["SERVER_PORT"])
@ -72,8 +74,15 @@ final class Tools
$serverport = '';
}
return 'http' . ($https ? 's' : '') . '://'
. $host . $serverport . $scriptname;
// check if BASE_URL is configured
if(BASE_URL) {
$baseUrl = BASE_URL;
} else {
$baseUrl = 'http' . ($https ? 's' : '') . '://' . $host . $serverport;
}
return $baseUrl . $scriptname;
}
/**

View file

@ -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);