Skip to content

Commit cea9764

Browse files
committed
Fix domain issue #2734
1 parent 9667175 commit cea9764

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

app/Core/Configuration/laravelConfig.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
|
313313
*/
314314

315-
'domain' => env('SESSION_DOMAIN'),
315+
'domain' => '',
316316

317317
/*
318318
|--------------------------------------------------------------------------

app/Core/Providers/Session.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,16 @@ public function register()
4141
$app['config']->set('session.files', $sessionDir);
4242
}
4343

44-
//Now that we know where the instance is bing called from
45-
//Let's add a domain level cache.
46-
$domain = 'localhost';
47-
if (! $app->runningInConsole()) {
48-
$domain = $app['request']->getFullUrl();
49-
}
50-
5144
//Most of this is set in the config but some things aren't clear until we get here.
45+
$app['config']->set('domain', is_array(parse_url(BASE_URL)) ? parse_url(BASE_URL)['host'] : null);
5246

5347
$sessionManager = new \Illuminate\Session\SessionManager($app);
5448

5549
return $sessionManager;
5650
});
5751

52+
53+
5854
$this->app->singleton('session.store', function ($app) {
5955
// First, we will create the session manager which is responsible for the
6056
// creation of the various session drivers when they are needed by the
@@ -70,6 +66,5 @@ public function register()
7066
});
7167

7268
$this->app->singleton(SymfonySessionDecorator::class, SymfonySessionDecorator::class);
73-
7469
}
7570
}

0 commit comments

Comments
 (0)