Fixed add cookie when localhost
is other than port 80
This commit is contained in:
parent
accae50b27
commit
b0b8bd5f78
|
@ -48,10 +48,11 @@ $version = include __DIR__ . '/../app/config/version.php';
|
|||
$redisHost = $request->getServer('_APP_REDIS_HOST', '');
|
||||
$redisPort = $request->getServer('_APP_REDIS_PORT', '');
|
||||
$utopia = new App('Asia/Tel_Aviv', $env);
|
||||
$port = parse_url($_SERVER['HTTP_HOST'], PHP_URL_PORT);
|
||||
|
||||
Resque::setBackend($redisHost . ':' . $redisPort);
|
||||
|
||||
define('COOKIE_DOMAIN', ($request->getServer('HTTP_HOST', null) !== 'localhost') ? '.' . $request->getServer('HTTP_HOST', false) : false);
|
||||
define('COOKIE_DOMAIN', ($request->getServer('HTTP_HOST', null) === 'localhost' || $request->getServer('HTTP_HOST', null) === 'localhost:' . $port) ? false : '.' . $request->getServer('HTTP_HOST', false));
|
||||
|
||||
/**
|
||||
* Registry
|
||||
|
|
Loading…
Reference in a new issue