osb/app/Http/Kernel.php

86 lines
3.0 KiB
PHP
Raw Normal View History

2017-11-03 05:26:07 +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 = [
2019-06-02 05:35:48 +00:00
\App\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
\App\Http\Middleware\SetSite::class,
2017-11-03 05:26:07 +00:00
];
/**
* 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,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
2017-11-03 05:26:07 +00:00
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
2018-06-05 11:13:57 +00:00
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
2017-11-03 05:26:07 +00: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 = [
2019-06-02 05:35:48 +00:00
'auth' => \App\Http\Middleware\Authenticate::class,
2017-11-03 05:26:07 +00:00
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
2017-11-03 05:26:07 +00:00
'can' => \Illuminate\Auth\Middleware\Authorize::class,
2018-05-20 12:53:14 +00:00
'demoMode' => \Spatie\DemoMode\DemoMode::class,
2017-11-03 05:26:07 +00:00
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
2018-07-31 04:11:00 +00:00
'role' => \App\Http\Middleware\Role::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'theme' => \Igaster\LaravelTheme\Middleware\setTheme::class,
2017-11-03 05:26:07 +00:00
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
2019-06-02 05:35:48 +00:00
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
/**
* 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,
\App\Http\Middleware\Authenticate::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,
2017-11-03 05:26:07 +00:00
];
}