From 6720c09a1c579c8a284e0217c868076e06a1b57c Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Sun, 14 Feb 2021 02:39:20 +0000 Subject: [PATCH] Shift middleware --- app/Http/Kernel.php | 3 ++- .../Middleware/CheckForMaintenanceMode.php | 17 ++++++++++++++ app/Http/Middleware/TrustProxies.php | 23 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 app/Http/Middleware/CheckForMaintenanceMode.php create mode 100644 app/Http/Middleware/TrustProxies.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index bdc9d3c8..e7058731 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -30,7 +30,7 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ - \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, + \App\Http\Middleware\CheckForMaintenanceMode::class, ]; protected $middlewareGroups = [ @@ -53,6 +53,7 @@ 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, 'auth.oauth' => \App\Http\Middleware\AuthenticateOAuth::class, 'can' => \App\Http\Middleware\Authorize::class, 'json-exceptions' => \App\Http\Middleware\JsonExceptions::class, diff --git a/app/Http/Middleware/CheckForMaintenanceMode.php b/app/Http/Middleware/CheckForMaintenanceMode.php new file mode 100644 index 00000000..35b9824b --- /dev/null +++ b/app/Http/Middleware/CheckForMaintenanceMode.php @@ -0,0 +1,17 @@ +