mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Make sure the /javascript/ url’s are ignored.
This commit is contained in:
64
app/Providers/FireflySessionProvider.php
Normal file
64
app/Providers/FireflySessionProvider.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* FireflySessionProvider.php
|
||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Providers;
|
||||
|
||||
use FireflyIII\Http\Middleware\StartFireflySession;
|
||||
use Illuminate\Session\SessionManager;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class FireflySessionProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->registerSessionManager();
|
||||
|
||||
$this->registerSessionDriver();
|
||||
|
||||
$this->app->singleton(StartFireflySession::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the session driver instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function registerSessionDriver()
|
||||
{
|
||||
$this->app->singleton(
|
||||
'session.store', function ($app) {
|
||||
// First, we will create the session manager which is responsible for the
|
||||
// creation of the various session drivers when they are needed by the
|
||||
// application instance, and will resolve them on a lazy load basis.
|
||||
return $app->make('session')->driver();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the session manager instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function registerSessionManager()
|
||||
{
|
||||
$this->app->singleton(
|
||||
'session', function ($app) {
|
||||
return new SessionManager($app);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user