1
0
Fork 0
mirror of synced 2024-06-03 11:24:48 +12:00

Fixed add cookie when localhost

is other than port 80
This commit is contained in:
eldadfux 2019-09-02 14:34:08 +03:00
parent accae50b27
commit b0b8bd5f78

View file

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