3 namespace BookStack\Http;
5 use Illuminate\Foundation\Http\Kernel as HttpKernel;
7 class Kernel extends HttpKernel
10 * The application's global HTTP middleware stack.
11 * These middleware are run during every request to your application.
13 * @var list<class-string>
15 protected $middleware = [
16 \BookStack\Http\Middleware\PreventRequestsDuringMaintenance::class,
17 \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
18 \BookStack\Http\Middleware\TrimStrings::class,
19 \BookStack\Http\Middleware\TrustProxies::class,
20 \BookStack\Http\Middleware\PreventResponseCaching::class,
24 * The application's route middleware groups.
26 * @var array<string, array<int, class-string>>
28 protected $middlewareGroups = [
30 \BookStack\Http\Middleware\ApplyCspRules::class,
31 \BookStack\Http\Middleware\EncryptCookies::class,
32 \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
33 \BookStack\Http\Middleware\StartSessionExtended::class,
34 \Illuminate\View\Middleware\ShareErrorsFromSession::class,
35 \BookStack\Http\Middleware\VerifyCsrfToken::class,
36 \BookStack\Http\Middleware\CheckEmailConfirmed::class,
37 \BookStack\Http\Middleware\RunThemeActions::class,
38 \BookStack\Http\Middleware\Localization::class,
41 \BookStack\Http\Middleware\ThrottleApiRequests::class,
42 \BookStack\Http\Middleware\EncryptCookies::class,
43 \BookStack\Http\Middleware\StartSessionIfCookieExists::class,
44 \BookStack\Http\Middleware\ApiAuthenticate::class,
45 \BookStack\Http\Middleware\CheckEmailConfirmed::class,
50 * The application's middleware aliases.
52 * @var array<string, class-string>
54 protected $middlewareAliases = [
55 'auth' => \BookStack\Http\Middleware\Authenticate::class,
56 'can' => \BookStack\Http\Middleware\CheckUserHasPermission::class,
57 'guest' => \BookStack\Http\Middleware\RedirectIfAuthenticated::class,
58 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
59 'guard' => \BookStack\Http\Middleware\CheckGuard::class,
60 'mfa-setup' => \BookStack\Http\Middleware\AuthenticatedOrPendingMfa::class,