mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
if webserver_url does not match eg. because of proxying, fix it
This commit is contained in:
parent
847352a62c
commit
b38542439a
@ -129,6 +129,16 @@ class Egw extends Egw\Base
|
|||||||
// load up the $GLOBALS['egw_info']['server'] array
|
// load up the $GLOBALS['egw_info']['server'] array
|
||||||
$GLOBALS['egw_info']['server'] += Config::read('phpgwapi');
|
$GLOBALS['egw_info']['server'] += Config::read('phpgwapi');
|
||||||
|
|
||||||
|
// if webserver_url does not match eg. because of proxying, fix it
|
||||||
|
if (isset($_SERVER['HTTP_X_FORWARDED_URI']) &&
|
||||||
|
($prefix = strpos($_SERVER['HTTP_X_FORWARDED_URI'],
|
||||||
|
$GLOBALS['egw_info']['server']['webserver_url'])))
|
||||||
|
{
|
||||||
|
$GLOBALS['egw_info']['server']['webserver_url'] =
|
||||||
|
substr($_SERVER['HTTP_X_FORWARDED_URI'], 0, $prefix).
|
||||||
|
$GLOBALS['egw_info']['server']['webserver_url'];
|
||||||
|
}
|
||||||
|
|
||||||
// if no server timezone set, use date_default_timezone_get() to determine it once
|
// if no server timezone set, use date_default_timezone_get() to determine it once
|
||||||
// it fills to log with deprecated warnings under 5.3 otherwise
|
// it fills to log with deprecated warnings under 5.3 otherwise
|
||||||
if (empty($GLOBALS['egw_info']['server']['server_timezone']) ||
|
if (empty($GLOBALS['egw_info']['server']['server_timezone']) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user