2019-09-18 16:50:01 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http;
|
|
|
|
|
2020-03-10 17:06:10 +01:00
|
|
|
use App\Http\Middleware\Authenticate;
|
|
|
|
use App\Http\Middleware\CheckForMaintenanceMode;
|
|
|
|
use App\Http\Middleware\EncryptCookies;
|
|
|
|
use App\Http\Middleware\GenerateMenus;
|
|
|
|
use App\Http\Middleware\RedirectIfAuthenticated;
|
|
|
|
use App\Http\Middleware\TrimStrings;
|
|
|
|
use App\Http\Middleware\TrustProxies;
|
|
|
|
use App\Http\Middleware\VerifyCsrfToken;
|
|
|
|
use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth;
|
|
|
|
use Illuminate\Auth\Middleware\Authorize;
|
|
|
|
use Illuminate\Auth\Middleware\EnsureEmailIsVerified;
|
|
|
|
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
2019-09-18 16:50:01 +02:00
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
2020-03-10 17:06:10 +01:00
|
|
|
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
|
|
|
|
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
|
|
|
|
use Illuminate\Http\Middleware\SetCacheHeaders;
|
|
|
|
use Illuminate\Routing\Middleware\SubstituteBindings;
|
|
|
|
use Illuminate\Routing\Middleware\ThrottleRequests;
|
|
|
|
use Illuminate\Routing\Middleware\ValidateSignature;
|
|
|
|
use Illuminate\Session\Middleware\AuthenticateSession;
|
|
|
|
use Illuminate\Session\Middleware\StartSession;
|
|
|
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
2019-09-18 16:50:01 +02:00
|
|
|
|
|
|
|
class Kernel extends HttpKernel
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The application's global HTTP middleware stack.
|
|
|
|
*
|
|
|
|
* These middleware are run during every request to your application.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middleware = [
|
2020-03-10 17:06:10 +01:00
|
|
|
TrustProxies::class,
|
|
|
|
CheckForMaintenanceMode::class,
|
|
|
|
ValidatePostSize::class,
|
|
|
|
TrimStrings::class,
|
|
|
|
ConvertEmptyStringsToNull::class,
|
2019-09-18 16:50:01 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware groups.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewareGroups = [
|
|
|
|
'web' => [
|
2020-03-10 17:06:10 +01:00
|
|
|
EncryptCookies::class,
|
|
|
|
AddQueuedCookiesToResponse::class,
|
|
|
|
StartSession::class,
|
2019-09-18 16:50:01 +02:00
|
|
|
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
2020-03-10 17:06:10 +01:00
|
|
|
ShareErrorsFromSession::class,
|
|
|
|
VerifyCsrfToken::class,
|
|
|
|
SubstituteBindings::class,
|
|
|
|
GenerateMenus::class,
|
2019-09-18 16:50:01 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
'api' => [
|
|
|
|
'throttle:60,1',
|
|
|
|
'bindings',
|
|
|
|
],
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware.
|
|
|
|
*
|
|
|
|
* These middleware may be assigned to groups or used individually.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $routeMiddleware = [
|
2020-03-10 17:06:10 +01:00
|
|
|
'auth' => Authenticate::class,
|
|
|
|
'auth.basic' => AuthenticateWithBasicAuth::class,
|
|
|
|
'bindings' => SubstituteBindings::class,
|
|
|
|
'cache.headers' => SetCacheHeaders::class,
|
|
|
|
'can' => Authorize::class,
|
|
|
|
'guest' => RedirectIfAuthenticated::class,
|
|
|
|
'signed' => ValidateSignature::class,
|
|
|
|
'throttle' => ThrottleRequests::class,
|
|
|
|
'verified' => EnsureEmailIsVerified::class,
|
2019-09-18 16:50:01 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The priority-sorted list of middleware.
|
|
|
|
*
|
|
|
|
* This forces non-global middleware to always be in the given order.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewarePriority = [
|
2020-03-10 17:06:10 +01:00
|
|
|
StartSession::class,
|
|
|
|
ShareErrorsFromSession::class,
|
|
|
|
Authenticate::class,
|
|
|
|
ThrottleRequests::class,
|
|
|
|
AuthenticateSession::class,
|
|
|
|
SubstituteBindings::class,
|
|
|
|
Authorize::class,
|
2019-09-18 16:50:01 +02:00
|
|
|
];
|
|
|
|
}
|