2023-06-11 12:14:03 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FleetCart\Http;
|
|
|
|
|
2023-12-03 14:07:47 +00:00
|
|
|
use FleetCart\Http\Middleware\RunUpdater;
|
|
|
|
use FleetCart\Http\Middleware\TrimStrings;
|
|
|
|
use FleetCart\Http\Middleware\TrustProxies;
|
|
|
|
use FleetCart\Http\Middleware\EncryptCookies;
|
|
|
|
use FleetCart\Http\Middleware\VerifyCsrfToken;
|
|
|
|
use Illuminate\Auth\Middleware\RequirePassword;
|
|
|
|
use Illuminate\Http\Middleware\SetCacheHeaders;
|
|
|
|
use Illuminate\Session\Middleware\StartSession;
|
2023-06-11 12:14:03 +00:00
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
2023-12-03 14:07:47 +00:00
|
|
|
use Illuminate\Routing\Middleware\ThrottleRequests;
|
|
|
|
use Illuminate\Routing\Middleware\ValidateSignature;
|
|
|
|
use FleetCart\Http\Middleware\ConvertStringBooleans;
|
|
|
|
use Illuminate\Auth\Middleware\EnsureEmailIsVerified;
|
|
|
|
use Illuminate\Routing\Middleware\SubstituteBindings;
|
|
|
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
|
|
|
use FleetCart\Http\Middleware\CheckForMaintenanceMode;
|
|
|
|
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
|
|
|
|
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
|
|
|
use FleetCart\Http\Middleware\RedirectToInstallerIfNotInstalled;
|
|
|
|
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
|
2023-06-11 12:14:03 +00:00
|
|
|
|
|
|
|
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 = [
|
2023-12-03 14:07:47 +00:00
|
|
|
EncryptCookies::class,
|
|
|
|
StartSession::class,
|
|
|
|
CheckForMaintenanceMode::class,
|
|
|
|
ValidatePostSize::class,
|
|
|
|
TrimStrings::class,
|
|
|
|
ConvertStringBooleans::class,
|
|
|
|
ConvertEmptyStringsToNull::class,
|
|
|
|
TrustProxies::class,
|
|
|
|
RedirectToInstallerIfNotInstalled::class,
|
|
|
|
RunUpdater::class,
|
2023-06-11 12:14:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware groups.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewareGroups = [
|
|
|
|
'web' => [
|
2023-12-03 14:07:47 +00:00
|
|
|
AddQueuedCookiesToResponse::class,
|
|
|
|
ShareErrorsFromSession::class,
|
|
|
|
VerifyCsrfToken::class,
|
|
|
|
SubstituteBindings::class,
|
2023-06-11 12:14:03 +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 = [
|
2023-12-03 14:07:47 +00:00
|
|
|
'bindings' => SubstituteBindings::class,
|
|
|
|
'cache.headers' => SetCacheHeaders::class,
|
|
|
|
'password.confirm' => RequirePassword::class,
|
|
|
|
'signed' => ValidateSignature::class,
|
|
|
|
'throttle' => ThrottleRequests::class,
|
|
|
|
'verified' => EnsureEmailIsVerified::class,
|
2023-06-11 12:14:03 +00:00
|
|
|
];
|
|
|
|
}
|