forked from extern/egroupware
fix for cookie domain, when using a proxy which rewrites the host-name
This commit is contained in:
parent
deb05b2ec1
commit
62f11b8d78
@ -430,7 +430,8 @@
|
||||
*/
|
||||
function phpgw_set_cookiedomain()
|
||||
{
|
||||
$this->cookie_domain = $_SERVER['HTTP_HOST'];
|
||||
// Use HTTP_X_FORWARDED_HOST if set, which is the case behind a none-transparent proxy
|
||||
$this->cookie_domain = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST'];
|
||||
|
||||
// remove port from HTTP_HOST
|
||||
if (preg_match("/^(.*):(.*)$/",$this->cookie_domain,$arr))
|
||||
|
Loading…
Reference in New Issue
Block a user