]> _ Git - cubist_cms-back.git/commitdiff
wip #7804 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Oct 2025 10:54:38 +0000 (12:54 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Oct 2025 10:54:38 +0000 (12:54 +0200)
src/CookieServiceProvider.php

index f35d55405e6fc820920d8ee146585c568f494f69..9fc1b1426819e404c3a7a5f2d4d50dda59b0dec8 100644 (file)
@@ -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) {