pixelfed/app/Http/Kernel.php

70 lines
2.6 KiB
PHP
Raw Normal View History

2018-04-15 23:56:48 +00: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 = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\TrustProxies::class,
];
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
2019-11-24 05:18:51 +00:00
\App\Http\Middleware\FrameGuard::class,
2018-04-15 23:56:48 +00:00
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
'bindings',
2019-10-02 00:35:42 +00:00
\Barryvdh\Cors\HandleCors::class,
2018-04-15 23:56:48 +00:00
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
2018-08-28 03:07:36 +00:00
'admin' => \App\Http\Middleware\Admin::class,
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
2018-04-15 23:56:48 +00:00
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
2018-08-28 03:07:36 +00:00
'can' => \Illuminate\Auth\Middleware\Authorize::class,
2018-09-09 20:19:57 +00:00
'dangerzone' => \App\Http\Middleware\DangerZone::class,
2018-11-17 20:33:31 +00:00
'localization' => \App\Http\Middleware\Localization::class,
2018-08-28 03:07:36 +00:00
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
2018-09-16 05:15:45 +00:00
'twofactor' => \App\Http\Middleware\TwoFactorAuth::class,
2018-08-28 03:07:36 +00:00
'validemail' => \App\Http\Middleware\EmailVerificationCheck::class,
2018-04-15 23:56:48 +00:00
];
}