2015-03-20 18:30:45 -06:00
|
|
|
<?php
|
|
|
|
|
2015-04-19 08:52:39 +01:00
|
|
|
/*
|
|
|
|
* This file is part of Cachet.
|
|
|
|
*
|
2015-07-06 17:37:01 +01:00
|
|
|
* (c) Alt Three Services Limited
|
2015-04-19 08:52:39 +01:00
|
|
|
*
|
|
|
|
* 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;
|
2019-02-15 10:26:39 +00:00
|
|
|
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 = [
|
2019-06-23 08:04:32 +00:00
|
|
|
'admin' => Admin::class,
|
|
|
|
'auth.api' => ApiAuthentication::class,
|
2019-01-03 19:45:43 +00:00
|
|
|
'auth.remoteuser' => RemoteUserAuthenticate::class,
|
2019-06-23 08:04:32 +00:00
|
|
|
'auth' => Authenticate::class,
|
|
|
|
'cache' => CacheControl::class,
|
|
|
|
'can' => Authorize::class,
|
|
|
|
'cors' => HandleCors::class,
|
|
|
|
'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
|
|
|
];
|
|
|
|
}
|