2019-05-14 07:52:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
|
|
|
2021-12-03 02:36:25 +00:00
|
|
|
use App\Http\Middleware\GuestUser;
|
2023-01-30 10:37:33 +00:00
|
|
|
use App\Http\Middleware\SwapinAuthUser;
|
2023-03-01 22:55:33 +00:00
|
|
|
use App\Http\Middleware\CheckUpdate;
|
2021-12-03 02:36:25 +00:00
|
|
|
|
2019-05-14 07:52:49 +00: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-08-23 01:37:08 +00:00
|
|
|
// \App\Http\Middleware\TrustHosts::class,
|
|
|
|
\App\Http\Middleware\TrustProxies::class,
|
|
|
|
\Fruitcake\Cors\HandleCors::class,
|
2019-05-14 07:52:49 +00:00
|
|
|
\App\Http\Middleware\CheckForMaintenanceMode::class,
|
|
|
|
\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' => [
|
|
|
|
\App\Http\Middleware\EncryptCookies::class,
|
|
|
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
2023-01-30 10:37:33 +00:00
|
|
|
SwapinAuthUser::class,
|
|
|
|
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
2019-05-14 07:52:49 +00:00
|
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
|
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2020-08-27 12:46:07 +00:00
|
|
|
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
|
2021-12-03 02:36:25 +00:00
|
|
|
GuestUser::class,
|
2023-03-01 22:55:33 +00:00
|
|
|
CheckUpdate::class,
|
2019-05-14 07:52:49 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
'api' => [
|
|
|
|
'throttle:60,1',
|
2023-01-30 10:37:33 +00:00
|
|
|
\App\Http\Middleware\EncryptCookies::class,
|
|
|
|
SwapinAuthUser::class,
|
2020-08-23 01:37:08 +00:00
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2019-05-14 07:52:49 +00:00
|
|
|
],
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware.
|
|
|
|
*
|
|
|
|
* These middleware may be assigned to groups or used individually.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $routeMiddleware = [
|
|
|
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
|
|
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
|
|
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
|
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
|
|
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
|
|
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
2020-08-23 01:37:08 +00:00
|
|
|
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
2019-05-14 07:52:49 +00:00
|
|
|
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
|
|
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
|
|
|
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
2020-09-20 13:29:22 +00:00
|
|
|
|
|
|
|
'localize' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes::class,
|
|
|
|
'localizationRedirect' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class,
|
|
|
|
'localeSessionRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class,
|
|
|
|
'localeCookieRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleCookieRedirect::class,
|
|
|
|
'localeViewPath' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class
|
2019-05-14 07:52:49 +00:00
|
|
|
];
|
|
|
|
}
|