firefly-iii/app/Http/Kernel.php

92 lines
2.6 KiB
PHP
Raw Normal View History

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