2015-12-06 19:58:49 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http;
|
|
|
|
|
2017-09-24 03:45:25 +02:00
|
|
|
use Pterodactyl\Http\Middleware\DaemonAuthenticate;
|
2015-12-06 19:58:49 +01:00
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
2017-09-24 03:45:25 +02:00
|
|
|
use Illuminate\Routing\Middleware\SubstituteBindings;
|
2015-12-06 19:58:49 +01:00
|
|
|
|
|
|
|
class Kernel extends HttpKernel
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The application's global HTTP middleware stack.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middleware = [
|
|
|
|
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
|
|
|
\Pterodactyl\Http\Middleware\EncryptCookies::class,
|
|
|
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
2017-04-02 03:01:10 +02:00
|
|
|
\Pterodactyl\Http\Middleware\TrimStrings::class,
|
2017-02-01 20:31:24 +01:00
|
|
|
|
2017-04-02 03:01:10 +02:00
|
|
|
/*
|
|
|
|
* Custom middleware applied to all routes.
|
|
|
|
*/
|
2017-02-01 20:10:28 +01:00
|
|
|
\Fideloper\Proxy\TrustProxies::class,
|
2015-12-06 19:58:49 +01:00
|
|
|
];
|
|
|
|
|
2016-09-03 23:09:00 +02:00
|
|
|
/**
|
|
|
|
* The application's route middleware groups.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewareGroups = [
|
|
|
|
'web' => [
|
|
|
|
\Pterodactyl\Http\Middleware\EncryptCookies::class,
|
|
|
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
|
|
\Pterodactyl\Http\Middleware\VerifyCsrfToken::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2017-04-02 03:01:10 +02:00
|
|
|
\Pterodactyl\Http\Middleware\LanguageMiddleware::class,
|
2017-09-26 03:58:16 +02:00
|
|
|
\Pterodactyl\Http\Middleware\RequireTwoFactorAuthentication::class,
|
2016-09-03 23:09:00 +02:00
|
|
|
],
|
|
|
|
'api' => [
|
2017-04-02 06:11:52 +02:00
|
|
|
\Pterodactyl\Http\Middleware\HMACAuthorization::class,
|
2016-09-03 23:09:00 +02:00
|
|
|
'throttle:60,1',
|
|
|
|
'bindings',
|
|
|
|
],
|
2017-09-24 03:45:25 +02:00
|
|
|
'daemon' => [
|
|
|
|
\Pterodactyl\Http\Middleware\Daemon\DaemonAuthenticate::class,
|
|
|
|
SubstituteBindings::class,
|
|
|
|
],
|
2016-09-03 23:09:00 +02:00
|
|
|
];
|
|
|
|
|
2015-12-06 19:58:49 +01:00
|
|
|
/**
|
|
|
|
* The application's route middleware.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $routeMiddleware = [
|
2016-09-03 23:09:00 +02:00
|
|
|
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
2015-12-06 19:58:49 +01:00
|
|
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
|
|
|
'guest' => \Pterodactyl\Http\Middleware\RedirectIfAuthenticated::class,
|
2017-09-03 04:35:33 +02:00
|
|
|
'server' => \Pterodactyl\Http\Middleware\ServerAuthenticate::class,
|
2017-09-25 03:27:57 +02:00
|
|
|
'subuser.auth' => \Pterodactyl\Http\Middleware\SubuserAccessAuthenticate::class,
|
|
|
|
'subuser' => \Pterodactyl\Http\Middleware\Server\SubuserAccess::class,
|
2015-12-06 19:58:49 +01:00
|
|
|
'admin' => \Pterodactyl\Http\Middleware\AdminAuthenticate::class,
|
2017-09-24 03:45:25 +02:00
|
|
|
'daemon-old' => DaemonAuthenticate::class,
|
2016-01-12 07:05:44 +01:00
|
|
|
'csrf' => \Pterodactyl\Http\Middleware\VerifyCsrfToken::class,
|
2016-09-03 23:09:00 +02:00
|
|
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
|
|
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
|
|
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2017-03-31 12:19:44 +02:00
|
|
|
'recaptcha' => \Pterodactyl\Http\Middleware\VerifyReCaptcha::class,
|
2017-09-21 19:48:57 +02:00
|
|
|
'schedule' => \Pterodactyl\Http\Middleware\Server\ScheduleAccess::class,
|
2015-12-06 19:58:49 +01:00
|
|
|
];
|
|
|
|
}
|