2016-08-28 10:05:21 +08: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 = [
|
|
|
|
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
2018-07-24 09:58:10 +08:00
|
|
|
\Illuminate\Foundation\Http\Middleware\TrimStrings::class,
|
2019-03-20 11:49:17 +08:00
|
|
|
\App\Http\Middleware\ConvertEmptyStringsToNull::class,
|
2019-04-25 13:01:39 +08:00
|
|
|
\App\Http\Middleware\DetectLanguagePrefer::class,
|
2016-08-28 10:05:21 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware groups.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewareGroups = [
|
|
|
|
'web' => [
|
2019-04-26 00:01:32 +08:00
|
|
|
\App\Http\Middleware\EncryptCookies::class,
|
2016-08-28 10:05:21 +08:00
|
|
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
2019-05-19 13:49:44 +08:00
|
|
|
\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class,
|
2020-03-18 10:48:13 +08:00
|
|
|
\App\Http\Middleware\EnforceEverGreen::class,
|
2019-09-06 23:53:47 +08:00
|
|
|
\App\Http\Middleware\RedirectToSetup::class,
|
2016-08-28 10:05:21 +08:00
|
|
|
],
|
|
|
|
|
2019-04-23 10:05:58 +08:00
|
|
|
'api' => [
|
|
|
|
'bindings',
|
|
|
|
],
|
|
|
|
|
2019-04-25 13:01:39 +08:00
|
|
|
'authorize' => [
|
|
|
|
'auth:web',
|
|
|
|
\App\Http\Middleware\RejectBannedUser::class,
|
|
|
|
\App\Http\Middleware\EnsureEmailFilled::class,
|
|
|
|
\App\Http\Middleware\FireUserAuthenticated::class,
|
|
|
|
],
|
2016-08-28 10:05:21 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware.
|
|
|
|
*
|
|
|
|
* These middleware may be assigned to groups or used individually.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $routeMiddleware = [
|
2019-12-14 11:10:37 +08:00
|
|
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
|
|
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2020-01-12 09:27:39 +08:00
|
|
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
2019-12-14 11:10:37 +08:00
|
|
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
2020-01-13 09:25:07 +08:00
|
|
|
'role' => \App\Http\Middleware\CheckRole::class,
|
2019-12-14 11:10:37 +08:00
|
|
|
'setup' => \App\Http\Middleware\CheckInstallation::class,
|
|
|
|
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
|
|
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
2020-01-13 09:25:07 +08:00
|
|
|
'verified' => \App\Http\Middleware\CheckUserVerified::class,
|
2016-08-28 10:05:21 +08:00
|
|
|
];
|
|
|
|
}
|