Cachet/app/Http/Kernel.php

64 lines
2.0 KiB
PHP
Raw Normal View History

2015-03-20 18:30:45 -06:00
<?php
/*
* This file is part of Cachet.
*
2015-07-06 17:37:01 +01:00
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2015-03-20 18:30:45 -06:00
namespace CachetHQ\Cachet\Http;
2019-01-26 10:38:21 +00:00
use Barryvdh\Cors\HandleCors;
2018-06-17 00:23:59 +01:00
use CachetHQ\Cachet\Http\Middleware\Admin;
use CachetHQ\Cachet\Http\Middleware\ApiAuthentication;
use CachetHQ\Cachet\Http\Middleware\Authenticate;
2019-02-19 07:27:44 +00:00
use CachetHQ\Cachet\Http\Middleware\CacheControl;
2018-06-17 00:23:59 +01:00
use CachetHQ\Cachet\Http\Middleware\Localize;
use CachetHQ\Cachet\Http\Middleware\ReadyForUse;
use CachetHQ\Cachet\Http\Middleware\RedirectIfAuthenticated;
2019-01-03 19:45:59 +00:00
use CachetHQ\Cachet\Http\Middleware\RemoteUserAuthenticate;
2018-06-17 00:23:59 +01:00
use CachetHQ\Cachet\Http\Middleware\SetupAlreadyCompleted;
use CachetHQ\Cachet\Http\Middleware\SubscribersConfigured;
use CachetHQ\Cachet\Http\Middleware\Throttler;
2018-06-17 00:23:59 +01:00
use CachetHQ\Cachet\Http\Middleware\TrustProxies;
use Illuminate\Auth\Middleware\Authorize;
2015-03-20 18:30:45 -06:00
use Illuminate\Foundation\Http\Kernel as HttpKernel;
2018-06-17 00:23:59 +01:00
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
2015-03-20 18:30:45 -06:00
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* @var array
*/
protected $middleware = [
2018-06-17 00:23:59 +01:00
TrustProxies::class,
CheckForMaintenanceMode::class,
2015-12-24 16:52:56 +00:00
];
2015-03-20 18:30:45 -06:00
/**
* The application's route middleware.
*
* @var array
*/
protected $routeMiddleware = [
2018-06-17 00:23:59 +01:00
'admin' => Admin::class,
'auth.api' => ApiAuthentication::class,
'auth.remoteuser' => RemoteUserAuthenticate::class,
'auth' => Authenticate::class,
'cache' => CacheControl::class,
2018-06-17 00:23:59 +01:00
'can' => Authorize::class,
2019-01-26 10:37:24 +00:00
'cors' => HandleCors::class,
2018-06-17 00:23:59 +01:00
'guest' => RedirectIfAuthenticated::class,
'localize' => Localize::class,
'ready' => ReadyForUse::class,
'setup' => SetupAlreadyCompleted::class,
'subscribers' => SubscribersConfigured::class,
'throttle' => Throttler::class,
2015-03-20 18:30:45 -06:00
];
}