mirror of
https://github.com/pyrohost/pyrodactyl.git
synced 2026-04-05 19:51:59 +02:00
fix: update http Kernel
This commit is contained in:
@@ -35,66 +35,74 @@ use Pterodactyl\Http\Middleware\Api\Application\AuthenticateApplicationUser;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
*/
|
||||
protected $middleware = [
|
||||
TrustProxies::class,
|
||||
HandleCors::class,
|
||||
PreventRequestsDuringMaintenance::class,
|
||||
ValidatePostSize::class,
|
||||
TrimStrings::class,
|
||||
ConvertEmptyStringsToNull::class,
|
||||
];
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
*/
|
||||
protected $middleware = [
|
||||
TrustProxies::class,
|
||||
HandleCors::class,
|
||||
PreventRequestsDuringMaintenance::class,
|
||||
ValidatePostSize::class,
|
||||
TrimStrings::class,
|
||||
ConvertEmptyStringsToNull::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
EncryptCookies::class,
|
||||
AddQueuedCookiesToResponse::class,
|
||||
StartSession::class,
|
||||
ShareErrorsFromSession::class,
|
||||
VerifyCsrfToken::class,
|
||||
SubstituteBindings::class,
|
||||
LanguageMiddleware::class,
|
||||
],
|
||||
'api' => [
|
||||
EnsureStatefulRequests::class,
|
||||
'auth:sanctum',
|
||||
IsValidJson::class,
|
||||
TrackAPIKey::class,
|
||||
RequireTwoFactorAuthentication::class,
|
||||
AuthenticateIPAccess::class,
|
||||
],
|
||||
'application-api' => [
|
||||
SubstituteBindings::class,
|
||||
AuthenticateApplicationUser::class,
|
||||
],
|
||||
'client-api' => [
|
||||
SubstituteClientBindings::class,
|
||||
RequireClientApiKey::class,
|
||||
],
|
||||
'daemon' => [
|
||||
SubstituteBindings::class,
|
||||
DaemonAuthenticate::class,
|
||||
],
|
||||
];
|
||||
protected $middlewarePriority = [
|
||||
SubstituteClientBindings::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*/
|
||||
protected $middlewareAliases = [
|
||||
'auth' => Authenticate::class,
|
||||
'auth.basic' => AuthenticateWithBasicAuth::class,
|
||||
'auth.session' => AuthenticateSession::class,
|
||||
'guest' => RedirectIfAuthenticated::class,
|
||||
'csrf' => VerifyCsrfToken::class,
|
||||
'throttle' => ThrottleRequests::class,
|
||||
'can' => Authorize::class,
|
||||
'bindings' => SubstituteBindings::class,
|
||||
'node.maintenance' => MaintenanceMiddleware::class,
|
||||
'captcha' => \Pterodactyl\Http\Middleware\VerifyCaptcha::class,
|
||||
];
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
EncryptCookies::class,
|
||||
AddQueuedCookiesToResponse::class,
|
||||
StartSession::class,
|
||||
ShareErrorsFromSession::class,
|
||||
VerifyCsrfToken::class,
|
||||
SubstituteBindings::class,
|
||||
LanguageMiddleware::class,
|
||||
],
|
||||
'api' => [
|
||||
EncryptCookies::class,
|
||||
AddQueuedCookiesToResponse::class,
|
||||
StartSession::class,
|
||||
EnsureStatefulRequests::class,
|
||||
'auth:sanctum',
|
||||
IsValidJson::class,
|
||||
TrackAPIKey::class,
|
||||
RequireTwoFactorAuthentication::class,
|
||||
AuthenticateIPAccess::class,
|
||||
|
||||
],
|
||||
'application-api' => [
|
||||
SubstituteBindings::class,
|
||||
AuthenticateApplicationUser::class,
|
||||
],
|
||||
'client-api' => [
|
||||
SubstituteClientBindings::class,
|
||||
RequireClientApiKey::class,
|
||||
],
|
||||
'daemon' => [
|
||||
SubstituteBindings::class,
|
||||
DaemonAuthenticate::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware.
|
||||
*/
|
||||
protected $middlewareAliases = [
|
||||
'auth' => Authenticate::class,
|
||||
'auth.basic' => AuthenticateWithBasicAuth::class,
|
||||
'auth.session' => AuthenticateSession::class,
|
||||
'guest' => RedirectIfAuthenticated::class,
|
||||
'csrf' => VerifyCsrfToken::class,
|
||||
'throttle' => ThrottleRequests::class,
|
||||
'can' => Authorize::class,
|
||||
'bindings' => SubstituteBindings::class,
|
||||
'node.maintenance' => MaintenanceMiddleware::class,
|
||||
'captcha' => \Pterodactyl\Http\Middleware\VerifyCaptcha::class,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user