2019-05-20 07:37:41 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http;
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
|
|
|
|
|
|
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 = [
|
2021-12-02 13:15:53 +01:00
|
|
|
\App\Http\Middleware\TrustProxies::class,
|
|
|
|
\Fruitcake\Cors\HandleCors::class,
|
|
|
|
// \App\Http\Middleware\CheckForMaintenanceMode::class,
|
|
|
|
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
2019-05-20 07:37:41 +02:00
|
|
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
|
|
|
\App\Http\Middleware\TrimStrings::class,
|
|
|
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
2020-02-27 12:18:46 +01:00
|
|
|
\App\Http\Middleware\SetLanguage::class,
|
2021-09-06 18:07:14 +02:00
|
|
|
\App\Http\Middleware\ForceJsonResponse::class,
|
2019-05-20 07:37:41 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware groups.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewareGroups = [
|
|
|
|
'web' => [
|
|
|
|
\App\Http\Middleware\EncryptCookies::class,
|
|
|
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
|
|
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
|
|
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2022-03-24 14:58:30 +01:00
|
|
|
\App\Http\Middleware\CustomCreateFreshApiToken::class,
|
|
|
|
],
|
|
|
|
|
|
|
|
'behind-auth' => [
|
|
|
|
\App\Http\Middleware\EncryptCookies::class,
|
|
|
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
|
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
|
|
\App\Http\Middleware\Authenticate::class,
|
|
|
|
\App\Http\Middleware\KickOutInactiveUser::class,
|
2021-10-22 14:18:13 +02:00
|
|
|
\App\Http\Middleware\CustomCreateFreshApiToken::class,
|
2019-05-20 07:37:41 +02:00
|
|
|
],
|
|
|
|
|
2021-11-04 23:57:23 +01:00
|
|
|
'api.v1' => [
|
2021-12-02 13:15:53 +01:00
|
|
|
'throttle:api',
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2021-11-17 23:37:16 +01:00
|
|
|
\App\Http\Middleware\KickOutInactiveUser::class,
|
2020-10-08 15:38:36 +02:00
|
|
|
\App\Http\Middleware\LogUserLastSeen::class,
|
2019-05-20 07:37:41 +02:00
|
|
|
],
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware.
|
|
|
|
*
|
|
|
|
* These middleware may be assigned to groups or used individually.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $routeMiddleware = [
|
|
|
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
2022-03-24 15:08:46 +01:00
|
|
|
'guest' => \App\Http\Middleware\RejectIfAuthenticated::class,
|
2019-05-20 07:37:41 +02:00
|
|
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
2020-10-12 14:00:09 +02:00
|
|
|
'AvoidResetPassword' => \App\Http\Middleware\AvoidPasswordResetInDemo::class,
|
2019-05-20 07:37:41 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The priority-sorted list of middleware.
|
|
|
|
*
|
|
|
|
* This forces non-global middleware to always be in the given order.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewarePriority = [
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
|
|
\App\Http\Middleware\Authenticate::class,
|
|
|
|
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
|
|
\Illuminate\Auth\Middleware\Authorize::class,
|
|
|
|
];
|
|
|
|
}
|