update middlewares

This commit is contained in:
Pig Fang 2023-01-29 11:59:30 +08:00
parent ececb3486b
commit 5c4afe8f80
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2

View File

@ -14,7 +14,8 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\Illuminate\Foundation\Http\Middleware\TrimStrings::class,
\App\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\DetectLanguagePrefer::class,
@ -34,11 +35,11 @@ class Kernel extends HttpKernel
\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\EnforceEverGreen::class,
\App\Http\Middleware\RedirectToSetup::class,
'bindings',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
'bindings',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'authorize' => [
@ -58,7 +59,6 @@ class Kernel extends HttpKernel
*/
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'role' => \App\Http\Middleware\CheckRole::class,