Shorten imports
This commit is contained in:
parent
79decafdc8
commit
e9aecfe6db
1 changed files with 42 additions and 24 deletions
|
@ -2,14 +2,32 @@
|
||||||
|
|
||||||
namespace Pterodactyl\Http;
|
namespace Pterodactyl\Http;
|
||||||
|
|
||||||
|
use Fideloper\Proxy\TrustProxies;
|
||||||
|
use Illuminate\Auth\Middleware\Authorize;
|
||||||
|
use Illuminate\Auth\Middleware\Authenticate;
|
||||||
|
use Pterodactyl\Http\Middleware\TrimStrings;
|
||||||
|
use Illuminate\Session\Middleware\StartSession;
|
||||||
|
use Pterodactyl\Http\Middleware\EncryptCookies;
|
||||||
|
use Pterodactyl\Http\Middleware\VerifyCsrfToken;
|
||||||
|
use Pterodactyl\Http\Middleware\VerifyReCaptcha;
|
||||||
|
use Pterodactyl\Http\Middleware\AdminAuthenticate;
|
||||||
|
use Pterodactyl\Http\Middleware\HMACAuthorization;
|
||||||
|
use Illuminate\Routing\Middleware\ThrottleRequests;
|
||||||
use Pterodactyl\Http\Middleware\DaemonAuthenticate;
|
use Pterodactyl\Http\Middleware\DaemonAuthenticate;
|
||||||
|
use Pterodactyl\Http\Middleware\LanguageMiddleware;
|
||||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||||
use Illuminate\Routing\Middleware\SubstituteBindings;
|
use Illuminate\Routing\Middleware\SubstituteBindings;
|
||||||
use Pterodactyl\Http\Middleware\AccessingValidServer;
|
use Pterodactyl\Http\Middleware\AccessingValidServer;
|
||||||
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||||
|
use Pterodactyl\Http\Middleware\RedirectIfAuthenticated;
|
||||||
|
use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth;
|
||||||
|
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||||
use Pterodactyl\Http\Middleware\Server\AuthenticateAsSubuser;
|
use Pterodactyl\Http\Middleware\Server\AuthenticateAsSubuser;
|
||||||
use Pterodactyl\Http\Middleware\Server\SubuserBelongsToServer;
|
use Pterodactyl\Http\Middleware\Server\SubuserBelongsToServer;
|
||||||
|
use Pterodactyl\Http\Middleware\RequireTwoFactorAuthentication;
|
||||||
use Pterodactyl\Http\Middleware\Server\DatabaseBelongsToServer;
|
use Pterodactyl\Http\Middleware\Server\DatabaseBelongsToServer;
|
||||||
use Pterodactyl\Http\Middleware\Server\ScheduleBelongsToServer;
|
use Pterodactyl\Http\Middleware\Server\ScheduleBelongsToServer;
|
||||||
|
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
|
||||||
|
|
||||||
class Kernel extends HttpKernel
|
class Kernel extends HttpKernel
|
||||||
{
|
{
|
||||||
|
@ -19,15 +37,15 @@ class Kernel extends HttpKernel
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $middleware = [
|
protected $middleware = [
|
||||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
CheckForMaintenanceMode::class,
|
||||||
\Pterodactyl\Http\Middleware\EncryptCookies::class,
|
EncryptCookies::class,
|
||||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
AddQueuedCookiesToResponse::class,
|
||||||
\Pterodactyl\Http\Middleware\TrimStrings::class,
|
TrimStrings::class,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Custom middleware applied to all routes.
|
* Custom middleware applied to all routes.
|
||||||
*/
|
*/
|
||||||
\Fideloper\Proxy\TrustProxies::class,
|
TrustProxies::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,23 +55,23 @@ class Kernel extends HttpKernel
|
||||||
*/
|
*/
|
||||||
protected $middlewareGroups = [
|
protected $middlewareGroups = [
|
||||||
'web' => [
|
'web' => [
|
||||||
\Pterodactyl\Http\Middleware\EncryptCookies::class,
|
EncryptCookies::class,
|
||||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
AddQueuedCookiesToResponse::class,
|
||||||
\Illuminate\Session\Middleware\StartSession::class,
|
StartSession::class,
|
||||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
ShareErrorsFromSession::class,
|
||||||
\Pterodactyl\Http\Middleware\VerifyCsrfToken::class,
|
VerifyCsrfToken::class,
|
||||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
SubstituteBindings::class,
|
||||||
\Pterodactyl\Http\Middleware\LanguageMiddleware::class,
|
LanguageMiddleware::class,
|
||||||
\Pterodactyl\Http\Middleware\RequireTwoFactorAuthentication::class,
|
RequireTwoFactorAuthentication::class,
|
||||||
],
|
],
|
||||||
'api' => [
|
'api' => [
|
||||||
\Pterodactyl\Http\Middleware\HMACAuthorization::class,
|
HMACAuthorization::class,
|
||||||
'throttle:60,1',
|
'throttle:60,1',
|
||||||
'bindings',
|
'bindings',
|
||||||
],
|
],
|
||||||
'daemon' => [
|
'daemon' => [
|
||||||
\Pterodactyl\Http\Middleware\Daemon\DaemonAuthenticate::class,
|
|
||||||
SubstituteBindings::class,
|
SubstituteBindings::class,
|
||||||
|
'daemon-old',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -63,18 +81,18 @@ class Kernel extends HttpKernel
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $routeMiddleware = [
|
protected $routeMiddleware = [
|
||||||
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
'auth' => Authenticate::class,
|
||||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
'auth.basic' => AuthenticateWithBasicAuth::class,
|
||||||
'guest' => \Pterodactyl\Http\Middleware\RedirectIfAuthenticated::class,
|
'guest' => RedirectIfAuthenticated::class,
|
||||||
'server' => AccessingValidServer::class,
|
'server' => AccessingValidServer::class,
|
||||||
'subuser.auth' => AuthenticateAsSubuser::class,
|
'subuser.auth' => AuthenticateAsSubuser::class,
|
||||||
'admin' => \Pterodactyl\Http\Middleware\AdminAuthenticate::class,
|
'admin' => AdminAuthenticate::class,
|
||||||
'daemon-old' => DaemonAuthenticate::class,
|
'daemon-old' => DaemonAuthenticate::class,
|
||||||
'csrf' => \Pterodactyl\Http\Middleware\VerifyCsrfToken::class,
|
'csrf' => VerifyCsrfToken::class,
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
'throttle' => ThrottleRequests::class,
|
||||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
'can' => Authorize::class,
|
||||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
'bindings' => SubstituteBindings::class,
|
||||||
'recaptcha' => \Pterodactyl\Http\Middleware\VerifyReCaptcha::class,
|
'recaptcha' => VerifyReCaptcha::class,
|
||||||
|
|
||||||
// Server specific middleware (used for authenticating access to resources)
|
// Server specific middleware (used for authenticating access to resources)
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue