mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 18:08:06 +00:00
116 lines
4.8 KiB
PHP
116 lines
4.8 KiB
PHP
<?php
|
|
/*
|
|
Flexisip Account Manager is a set of tools to manage SIP accounts.
|
|
Copyright (C) 2020 Belledonne Communications SARL, All rights reserved.
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
namespace App\Http;
|
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
|
|
class Kernel extends HttpKernel
|
|
{
|
|
/**
|
|
* The application's global HTTP middleware stack.
|
|
*
|
|
* These middleware are run during every request to your application.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $middleware = [
|
|
\App\Http\Middleware\TrustProxies::class,
|
|
\App\Http\Middleware\CheckForMaintenanceMode::class,
|
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
|
\App\Http\Middleware\TrimStrings::class,
|
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class
|
|
];
|
|
|
|
/**
|
|
* The application's route middleware groups.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $middlewareGroups = [
|
|
'web' => [
|
|
\App\Http\Middleware\EncryptCookies::class,
|
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
\App\Http\Middleware\Localization::class,
|
|
'space.check',
|
|
],
|
|
|
|
'api' => [
|
|
'throttle:600,1', // move to 600 instead of 60
|
|
'bindings',
|
|
'validate_json',
|
|
'localization',
|
|
'space.check',
|
|
],
|
|
];
|
|
|
|
/**
|
|
* The application's route middleware.
|
|
*
|
|
* These middleware may be assigned to groups or used individually.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $middlewareAliases = [
|
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
|
'auth.admin' => \App\Http\Middleware\AuthenticateAdmin::class,
|
|
'auth.super_admin' => \App\Http\Middleware\AuthenticateSuperAdmin::class,
|
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
|
'auth.digest_or_key' => \App\Http\Middleware\AuthenticateDigestOrKey::class,
|
|
'auth.jwt' => \App\Http\Middleware\AuthenticateJWT::class,
|
|
'auth.check_blocked' => \App\Http\Middleware\CheckBlocked::class,
|
|
'validate_json' => \App\Http\Middleware\ValidateJSON::class,
|
|
'web_panel_enabled' => \App\Http\Middleware\IsWebPanelEnabled::class,
|
|
'public_registration' => \App\Http\Middleware\IsPublicRegistration::class,
|
|
'phone_registration' => \App\Http\Middleware\IsPhoneRegistration::class,
|
|
'intercom_features' => \App\Http\Middleware\IsIntercomFeatures::class,
|
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
|
'cookie' => \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
'cookie.encrypt' => \App\Http\Middleware\EncryptCookies::class,
|
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
|
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
|
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
|
'space.check' => \App\Http\Middleware\SpaceCheck::class,
|
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
|
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
|
'localization' => \App\Http\Middleware\Localization::class,
|
|
];
|
|
|
|
/**
|
|
* The priority-sorted list of middleware.
|
|
*
|
|
* This forces non-global middleware to always be in the given order.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $middlewarePriority = [
|
|
\Illuminate\Session\Middleware\StartSession::class,
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
\Illuminate\Routing\Middleware\ThrottleRequests::class,
|
|
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
\Illuminate\Auth\Middleware\Authorize::class,
|
|
];
|
|
}
|