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.
|
|
|
|
*
|
2023-03-26 23:04:06 +02:00
|
|
|
* @var array<int, class-string|string>
|
2019-05-20 07:37:41 +02:00
|
|
|
*/
|
|
|
|
protected $middleware = [
|
2022-11-14 17:10:47 +01:00
|
|
|
// \App\Http\Middleware\TrustHosts::class,
|
2021-12-02 13:15:53 +01:00
|
|
|
\App\Http\Middleware\TrustProxies::class,
|
2022-11-14 17:10:47 +01:00
|
|
|
\Illuminate\Http\Middleware\HandleCors::class,
|
2021-12-02 13:15:53 +01:00
|
|
|
\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,
|
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.
|
|
|
|
*
|
2023-03-26 23:04:06 +02:00
|
|
|
* @var array<string, array<int, class-string|string>>
|
2019-05-20 07:37:41 +02:00
|
|
|
*/
|
|
|
|
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,
|
2023-03-15 11:46:37 +01:00
|
|
|
\App\Http\Middleware\SetLanguage::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,
|
2022-05-13 16:44:01 +02:00
|
|
|
// \Illuminate\Session\Middleware\StartSession::class,
|
2022-03-24 14:58:30 +01:00
|
|
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
|
|
\App\Http\Middleware\Authenticate::class,
|
|
|
|
\App\Http\Middleware\KickOutInactiveUser::class,
|
2024-03-06 08:40:29 +01:00
|
|
|
\App\Http\Middleware\LogUserLastSeen::class,
|
2023-03-15 11:46:37 +01:00
|
|
|
\App\Http\Middleware\SetLanguage::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' => [
|
2023-12-20 16:55:58 +01:00
|
|
|
\Illuminate\Routing\Middleware\ThrottleRequests::class . ':api',
|
2021-12-02 13:15:53 +01:00
|
|
|
\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,
|
2023-03-15 11:46:37 +01:00
|
|
|
\App\Http\Middleware\SetLanguage::class,
|
2019-05-20 07:37:41 +02:00
|
|
|
],
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
2023-08-01 16:33:55 +02:00
|
|
|
* The application's middleware aliases.
|
2019-05-20 07:37:41 +02:00
|
|
|
*
|
2023-08-01 11:26:58 +02:00
|
|
|
* Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
|
2019-05-20 07:37:41 +02:00
|
|
|
*
|
2023-03-26 23:04:06 +02:00
|
|
|
* @var array<string, class-string|string>
|
2019-05-20 07:37:41 +02:00
|
|
|
*/
|
2023-08-01 11:26:58 +02:00
|
|
|
protected $middlewareAliases = [
|
2024-09-20 10:50:25 +02:00
|
|
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
|
|
|
'admin' => \App\Http\Middleware\AdminOnly::class,
|
|
|
|
'guest' => \App\Http\Middleware\RejectIfAuthenticated::class,
|
|
|
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
|
|
|
'rejectIfDemoMode' => \App\Http\Middleware\RejectIfDemoMode::class,
|
|
|
|
'rejectIfReverseProxy' => \App\Http\Middleware\RejectIfReverseProxy::class,
|
|
|
|
'RejectIfSsoOnlyAndNotForAdmin' => \App\Http\Middleware\RejectIfSsoOnlyAndNotForAdmin::class,
|
|
|
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
2022-11-14 17:10:47 +01:00
|
|
|
// 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
|
|
|
// 'signed' => \App\Http\Middleware\ValidateSignature::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.
|
|
|
|
*
|
2022-08-26 15:57:18 +02:00
|
|
|
* @var string[]
|
2019-05-20 07:37:41 +02:00
|
|
|
*/
|
|
|
|
protected $middlewarePriority = [
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
|
|
\App\Http\Middleware\Authenticate::class,
|
2023-03-15 11:46:37 +01:00
|
|
|
\App\Http\Middleware\SetLanguage::class,
|
2019-05-20 07:37:41 +02:00
|
|
|
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
|
|
\Illuminate\Auth\Middleware\Authorize::class,
|
|
|
|
];
|
|
|
|
}
|