From 5c4afe8f80e0ee7685b0fecf0eead9fd5c6cc72a Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sun, 29 Jan 2023 11:59:30 +0800 Subject: [PATCH] update middlewares --- app/Http/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 47de09ab..49e1ffab 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -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,