2018-05-09 13:05:17 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
|
|
|
|
|
|
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-07-09 13:22:50 +00:00
|
|
|
// \App\Http\Middleware\TrustHosts::class,
|
2020-05-23 17:05:18 +00:00
|
|
|
\App\Http\Middleware\TrustProxies::class,
|
2020-07-08 12:36:51 +00:00
|
|
|
\App\Http\Middleware\HandleCors::class,
|
2020-11-03 16:18:31 +00:00
|
|
|
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
2018-05-09 13:05:17 +00:00
|
|
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
|
|
|
\App\Http\Middleware\TrimStrings::class,
|
|
|
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware groups.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewareGroups = [
|
|
|
|
'web' => [
|
2018-09-18 19:56:48 +00:00
|
|
|
\App\Http\Middleware\CheckInstalled::class,
|
2018-05-09 13:05:17 +00:00
|
|
|
\App\Http\Middleware\EncryptCookies::class,
|
|
|
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
2019-02-12 23:45:04 +00:00
|
|
|
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
2018-05-09 13:05:17 +00:00
|
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
|
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
|
|
],
|
|
|
|
|
2020-06-12 21:06:50 +00:00
|
|
|
'auth' => [
|
2020-06-05 16:50:58 +00:00
|
|
|
\App\Http\Middleware\LegacyExternalAuth::class,
|
2020-06-12 21:06:50 +00:00
|
|
|
'authenticate',
|
2020-06-05 16:50:58 +00:00
|
|
|
\App\Http\Middleware\VerifyTwoFactor::class,
|
|
|
|
\App\Http\Middleware\LoadUserPreferences::class,
|
|
|
|
],
|
|
|
|
|
2018-10-01 02:23:00 +00:00
|
|
|
'minimal' => [
|
|
|
|
\App\Http\Middleware\EncryptCookies::class,
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
|
|
],
|
|
|
|
|
2018-05-09 13:05:17 +00:00
|
|
|
'api' => [
|
2020-11-22 02:21:47 +00:00
|
|
|
\App\Http\Middleware\EnforceJson::class,
|
2020-05-23 17:05:18 +00:00
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2020-06-12 21:06:50 +00:00
|
|
|
'authenticate:token',
|
2018-05-09 13:05:17 +00:00
|
|
|
],
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware.
|
|
|
|
*
|
|
|
|
* These middleware may be assigned to groups or used individually.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $routeMiddleware = [
|
2020-06-12 21:06:50 +00:00
|
|
|
'authenticate' => \App\Http\Middleware\Authenticate::class,
|
2018-05-09 13:05:17 +00:00
|
|
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
2019-02-12 23:45:04 +00:00
|
|
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
2018-05-09 13:05:17 +00:00
|
|
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
2019-05-23 15:05:45 +00:00
|
|
|
'deny-demo' => \App\Http\Middleware\DenyDemoUser::class,
|
2018-05-09 13:05:17 +00:00
|
|
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
2020-05-23 17:05:18 +00:00
|
|
|
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
2019-02-12 23:45:04 +00:00
|
|
|
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
2018-05-09 13:05:17 +00:00
|
|
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
2019-02-12 23:45:04 +00:00
|
|
|
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
2018-05-09 13:05:17 +00:00
|
|
|
];
|
|
|
|
|
2019-02-12 23:45:04 +00:00
|
|
|
/**
|
|
|
|
* The priority-sorted list of middleware.
|
|
|
|
*
|
|
|
|
* This forces non-global middleware to always be in the given order.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewarePriority = [
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
2020-06-12 21:06:50 +00:00
|
|
|
\App\Http\Middleware\LegacyExternalAuth::class,
|
2020-05-23 17:05:18 +00:00
|
|
|
\App\Http\Middleware\Authenticate::class,
|
|
|
|
\Illuminate\Routing\Middleware\ThrottleRequests::class,
|
2019-02-12 23:45:04 +00:00
|
|
|
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
|
|
\Illuminate\Auth\Middleware\Authorize::class,
|
|
|
|
];
|
2018-05-09 13:05:17 +00:00
|
|
|
}
|