From: Vincent Vanwaelscappel Date: Thu, 16 Oct 2025 10:54:38 +0000 (+0200) Subject: wip #7804 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1fb479d66cb2fa049c20a9b0fc122ffa225b5144;p=cubist_cms-back.git wip #7804 @1 --- diff --git a/src/CookieServiceProvider.php b/src/CookieServiceProvider.php index f35d554..9fc1b14 100644 --- a/src/CookieServiceProvider.php +++ b/src/CookieServiceProvider.php @@ -9,12 +9,14 @@ class CookieServiceProvider extends Base { public function register() { + $this->app->singleton('cookie', function ($app) { + $config = $app->make('config')->get('session'); $domains = explode(',', $config['domain']); - if (count($domains) === 1) { + if (count($domains) === 1 || !isset($_SERVER['HTTP_HOST'])) { $domain = $domains[0]; } else { foreach ($domains as $domain) {