Shift HTTP kernel and middleware

This commit is contained in:
Shift
2023-01-07 20:33:04 +00:00
parent 0f3ee8ab58
commit 0590f1a07a
4 changed files with 10 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ class Kernel extends HttpKernel
* @var array * @var array
*/ */
protected $middleware = [ protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::class,
]; ];
/** /**
@@ -27,7 +27,7 @@ class Kernel extends HttpKernel
*/ */
protected $middlewareGroups = [ protected $middlewareGroups = [
'web' => [ 'web' => [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::class,
\App\Http\Middleware\EncryptCookies::class, \App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class, \Illuminate\Session\Middleware\StartSession::class,
@@ -37,8 +37,8 @@ class Kernel extends HttpKernel
\Illuminate\Routing\Middleware\SubstituteBindings::class, \Illuminate\Routing\Middleware\SubstituteBindings::class,
], ],
'api' => [ 'api' => [
'throttle:60,1', 'throttle:api',
'bindings', \Illuminate\Routing\Middleware\SubstituteBindings::class,
], ],
]; ];
@@ -62,7 +62,6 @@ class Kernel extends HttpKernel
'board' => \App\Http\Middleware\CheckBoard::class, 'board' => \App\Http\Middleware\CheckBoard::class,
'install' => \App\Http\Middleware\Install::class, 'install' => \App\Http\Middleware\Install::class,
'redirect' => \App\Http\Middleware\Redirect::class, 'redirect' => \App\Http\Middleware\Redirect::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'installer' => \App\Http\Middleware\IsInstalled::class, 'installer' => \App\Http\Middleware\IsInstalled::class,
'force.option' => \App\Http\Middleware\TicketViewURL::class, 'force.option' => \App\Http\Middleware\TicketViewURL::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,

View File

@@ -2,14 +2,14 @@
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware; use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
class CheckForMaintenanceMode extends Middleware class PreventRequestsDuringMaintenance extends Middleware
{ {
/** /**
* The URIs that should be reachable while maintenance mode is enabled. * The URIs that should be reachable while maintenance mode is enabled.
* *
* @var array * @var array<int, string>
*/ */
protected $except = [ protected $except = [
// //

View File

@@ -9,9 +9,10 @@ class TrimStrings extends Middleware
/** /**
* The names of the attributes that should not be trimmed. * The names of the attributes that should not be trimmed.
* *
* @var array * @var array<int, string>
*/ */
protected $except = [ protected $except = [
'current_password',
'password', 'password',
'password_confirmation', 'password_confirmation',
]; ];

View File

@@ -9,7 +9,7 @@ class TrustHosts extends Middleware
/** /**
* Get the host patterns that should be trusted. * Get the host patterns that should be trusted.
* *
* @return array * @return array<int, string|null>
*/ */
public function hosts() public function hosts()
{ {