2021-06-26 11:23:15 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace BookStack\Http;
|
2015-07-12 15:01:42 -04:00
|
|
|
|
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
|
|
|
|
|
|
class Kernel extends HttpKernel
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The application's global HTTP middleware stack.
|
2016-09-17 13:22:04 -04:00
|
|
|
* These middleware are run during every request to your application.
|
2015-07-12 15:01:42 -04:00
|
|
|
*/
|
|
|
|
protected $middleware = [
|
2019-09-06 17:14:39 -04:00
|
|
|
\BookStack\Http\Middleware\CheckForMaintenanceMode::class,
|
2017-09-30 09:31:27 -04:00
|
|
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
|
|
|
\BookStack\Http\Middleware\TrimStrings::class,
|
2017-11-19 10:56:06 -05:00
|
|
|
\BookStack\Http\Middleware\TrustProxies::class,
|
2016-09-17 13:22:04 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware groups.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewareGroups = [
|
|
|
|
'web' => [
|
2021-01-01 21:43:50 -05:00
|
|
|
\BookStack\Http\Middleware\ControlIframeSecurity::class,
|
2016-09-17 13:22:04 -04:00
|
|
|
\BookStack\Http\Middleware\EncryptCookies::class,
|
|
|
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
2017-09-30 09:31:27 -04:00
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
2016-09-17 13:22:04 -04:00
|
|
|
\BookStack\Http\Middleware\VerifyCsrfToken::class,
|
2021-08-30 16:28:17 -04:00
|
|
|
\BookStack\Http\Middleware\CheckEmailConfirmed::class,
|
2021-03-17 08:56:56 -04:00
|
|
|
\BookStack\Http\Middleware\RunThemeActions::class,
|
2019-09-19 10:12:10 -04:00
|
|
|
\BookStack\Http\Middleware\Localization::class,
|
2016-09-17 13:22:04 -04:00
|
|
|
],
|
|
|
|
'api' => [
|
2020-01-18 10:03:28 -05:00
|
|
|
\BookStack\Http\Middleware\ThrottleApiRequests::class,
|
2019-12-30 10:46:12 -05:00
|
|
|
\BookStack\Http\Middleware\EncryptCookies::class,
|
2019-12-30 09:51:28 -05:00
|
|
|
\BookStack\Http\Middleware\StartSessionIfCookieExists::class,
|
2019-12-29 21:16:07 -05:00
|
|
|
\BookStack\Http\Middleware\ApiAuthenticate::class,
|
2021-08-30 16:28:17 -04:00
|
|
|
\BookStack\Http\Middleware\CheckEmailConfirmed::class,
|
2016-09-17 13:22:04 -04:00
|
|
|
],
|
2015-07-12 15:01:42 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The application's route middleware.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $routeMiddleware = [
|
2015-09-10 14:31:09 -04:00
|
|
|
'auth' => \BookStack\Http\Middleware\Authenticate::class,
|
2021-08-28 16:51:15 -04:00
|
|
|
'can' => \BookStack\Http\Middleware\CheckUserHasPermission::class,
|
2015-09-10 14:31:09 -04:00
|
|
|
'guest' => \BookStack\Http\Middleware\RedirectIfAuthenticated::class,
|
2020-02-02 08:10:21 -05:00
|
|
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
|
|
|
'guard' => \BookStack\Http\Middleware\CheckGuard::class,
|
2021-08-02 17:02:25 -04:00
|
|
|
'mfa-setup' => \BookStack\Http\Middleware\AuthenticatedOrPendingMfa::class,
|
2015-07-12 15:01:42 -04:00
|
|
|
];
|
|
|
|
}
|