Uses Uri::host() to calculate the host. If localhost, set it to ''

Now also works with Chrome on localhost SSL sites. The problem was,
Chrome on Localhost wants the domain to be `""` or `false` even if the
site is accessed with another domain name.
Worked fine in other browsers.
This commit is contained in:
Flavio Copes
2015-12-23 09:18:27 +01:00
parent 3698afb8a6
commit efded08d6e

View File

@@ -42,7 +42,10 @@ class Session extends \RocketTheme\Toolbox\Session\Session
$session_path
);
$domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false;
$domain = $uri->host();
if ($domain == 'localhost') {
$domain = '';
}
$secure = $config->get('system.session.secure', false);
$httponly = $config->get('system.session.httponly', true);