From efded08d6efc52b2df63357fa08ed4b38b6ca59f Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Wed, 23 Dec 2015 09:18:27 +0100 Subject: [PATCH] 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. --- system/src/Grav/Common/Session.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Session.php b/system/src/Grav/Common/Session.php index 1266d3ccb..bb34d3b2c 100644 --- a/system/src/Grav/Common/Session.php +++ b/system/src/Grav/Common/Session.php @@ -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);