2016-01-08 09:01:21 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FireflyIII\Http;
|
2015-02-05 21:39:52 -06:00
|
|
|
|
2016-01-09 01:20:55 -06:00
|
|
|
use FireflyIII\Http\Middleware\Authenticate;
|
2016-01-09 08:39:02 -06:00
|
|
|
use FireflyIII\Http\Middleware\Binder;
|
2016-01-09 01:20:55 -06:00
|
|
|
use FireflyIII\Http\Middleware\EncryptCookies;
|
|
|
|
use FireflyIII\Http\Middleware\Range;
|
|
|
|
use FireflyIII\Http\Middleware\RedirectIfAuthenticated;
|
|
|
|
use FireflyIII\Http\Middleware\VerifyCsrfToken;
|
|
|
|
use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth;
|
|
|
|
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
2015-02-05 21:39:52 -06:00
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
2016-01-09 01:20:55 -06:00
|
|
|
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
|
|
|
|
use Illuminate\Routing\Middleware\ThrottleRequests;
|
|
|
|
use Illuminate\Session\Middleware\StartSession;
|
|
|
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
2015-02-05 21:39:52 -06:00
|
|
|
|
2016-01-09 01:20:55 -06:00
|
|
|
/**
|
|
|
|
* Class Kernel
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Http
|
|
|
|
*/
|
2015-02-06 12:33:31 -06:00
|
|
|
class Kernel extends HttpKernel
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The application's global HTTP middleware stack.
|
|
|
|
*
|
2016-01-08 09:01:21 -06:00
|
|
|
* These middleware are run during every request to your application.
|
|
|
|
*
|
2015-02-06 12:33:31 -06:00
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middleware
|
|
|
|
= [
|
2016-01-09 01:20:55 -06:00
|
|
|
CheckForMaintenanceMode::class,
|
2015-02-06 12:33:31 -06:00
|
|
|
];
|
2015-02-05 21:39:52 -06:00
|
|
|
|
2015-02-06 12:33:31 -06:00
|
|
|
/**
|
2016-01-08 09:01:21 -06:00
|
|
|
* The application's route middleware groups.
|
2015-02-06 12:33:31 -06:00
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2016-01-08 09:01:21 -06:00
|
|
|
protected $middlewareGroups
|
2015-02-06 12:33:31 -06:00
|
|
|
= [
|
2016-01-09 00:46:11 -06:00
|
|
|
'web' => [
|
2016-01-09 01:20:55 -06:00
|
|
|
EncryptCookies::class,
|
|
|
|
AddQueuedCookiesToResponse::class,
|
|
|
|
StartSession::class,
|
|
|
|
ShareErrorsFromSession::class,
|
|
|
|
VerifyCsrfToken::class,
|
2016-01-08 09:01:21 -06:00
|
|
|
],
|
2016-01-09 00:46:11 -06:00
|
|
|
'web-auth' => [
|
2016-01-09 01:20:55 -06:00
|
|
|
EncryptCookies::class,
|
|
|
|
AddQueuedCookiesToResponse::class,
|
|
|
|
StartSession::class,
|
|
|
|
ShareErrorsFromSession::class,
|
|
|
|
VerifyCsrfToken::class,
|
|
|
|
Authenticate::class,
|
2016-01-09 00:46:11 -06:00
|
|
|
],
|
|
|
|
'web-auth-range' => [
|
2016-01-09 01:20:55 -06:00
|
|
|
EncryptCookies::class,
|
|
|
|
AddQueuedCookiesToResponse::class,
|
|
|
|
StartSession::class,
|
|
|
|
ShareErrorsFromSession::class,
|
|
|
|
VerifyCsrfToken::class,
|
|
|
|
Authenticate::class,
|
|
|
|
Range::class,
|
2016-01-09 08:39:02 -06:00
|
|
|
Binder::class,
|
2016-01-09 00:46:11 -06:00
|
|
|
],
|
2015-03-28 00:19:09 -05:00
|
|
|
|
2016-01-08 09:01:21 -06:00
|
|
|
'api' => [
|
|
|
|
'throttle:60,1',
|
|
|
|
],
|
2015-02-06 12:33:31 -06:00
|
|
|
];
|
2015-02-05 21:39:52 -06:00
|
|
|
|
2016-01-08 09:01:21 -06:00
|
|
|
/**
|
|
|
|
* The application's route middleware.
|
|
|
|
*
|
|
|
|
* These middleware may be assigned to groups or used individually.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $routeMiddleware
|
|
|
|
= [
|
2016-01-09 01:20:55 -06:00
|
|
|
'auth' => Authenticate::class,
|
|
|
|
'auth.basic' => AuthenticateWithBasicAuth::class,
|
|
|
|
'guest' => RedirectIfAuthenticated::class,
|
|
|
|
'throttle' => ThrottleRequests::class,
|
|
|
|
'range' => Range::class,
|
2016-01-08 09:01:21 -06:00
|
|
|
];
|
2015-02-05 21:39:52 -06:00
|
|
|
}
|