1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/app/Http/Kernel.php

123 lines
4.9 KiB
PHP
Raw Normal View History

2018-10-04 19:10:43 +02:00
<?php
2019-05-11 05:32:07 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
2019-05-11 05:32:07 +02:00
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
2019-05-11 05:32:07 +02:00
*
* @license https://opensource.org/licenses/AAL
*/
2018-10-04 19:10:43 +02:00
namespace App\Http;
2019-07-08 02:08:57 +02:00
use App\Http\Middleware\ContactTokenAuth;
2018-10-04 19:10:43 +02:00
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\CheckForMaintenanceMode::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
2019-09-26 12:49:52 +02:00
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
2018-10-04 19:10:43 +02:00
\App\Http\Middleware\TrustProxies::class,
2020-09-07 12:00:20 +02:00
//\Fruitcake\Cors\HandleCors::class,
\App\Http\Middleware\Cors::class,
2020-06-18 12:52:25 +02:00
2018-10-04 19:10:43 +02:00
];
/**
* 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\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
2019-03-26 05:46:08 +01:00
\App\Http\Middleware\QueryLogging::class,
2018-10-04 19:10:43 +02:00
],
'api' => [
'throttle:60,1',
'bindings',
2019-03-26 05:46:08 +01:00
'query_logging',
2019-09-11 01:31:55 +02:00
\App\Http\Middleware\StartupCheck::class,
2020-09-23 02:16:19 +02:00
\App\Http\Middleware\Cors::class,
2018-10-04 19:10:43 +02:00
],
2019-07-08 02:08:57 +02:00
'contact' => [
'throttle:60,1',
'bindings',
'query_logging',
],
'client' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\App\Http\Middleware\StartupCheck::class,
\App\Http\Middleware\QueryLogging::class,
],
2020-07-28 13:19:51 +02:00
'shop' => [
'throttle:60,1',
'bindings',
'query_logging',
],
2018-10-04 19:10:43 +02:00
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
2018-10-04 19:10:43 +02:00
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
2019-03-26 05:46:08 +01:00
'query_logging' => \App\Http\Middleware\QueryLogging::class,
2019-03-27 05:50:13 +01:00
'token_auth' => \App\Http\Middleware\TokenAuth::class,
'api_secret_check' => \App\Http\Middleware\ApiSecretCheck::class,
2019-07-08 02:08:57 +02:00
'contact_token_auth' => \App\Http\Middleware\ContactTokenAuth::class,
'contact_db' => \App\Http\Middleware\ContactSetDb::class,
'domain_db' => \App\Http\Middleware\SetDomainNameDb::class,
'email_db' => \App\Http\Middleware\SetEmailDb::class,
'invite_db' => \App\Http\Middleware\SetInviteDb::class,
'password_protected' => \App\Http\Middleware\PasswordProtection::class,
2019-09-08 14:13:55 +02:00
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'portal_enabled' => \App\Http\Middleware\ClientPortalEnabled::class,
'url_db' => \App\Http\Middleware\UrlSetDb::class,
'web_db' => \App\Http\Middleware\SetWebDb::class,
'api_db' => \App\Http\Middleware\SetDb::class,
'company_key_db' => \App\Http\Middleware\SetDbByCompanyKey::class,
'locale' => \App\Http\Middleware\Locale::class,
2020-05-28 17:39:38 +02:00
'contact.register' => \App\Http\Middleware\ContactRegister::class,
'shop_token_auth' => \App\Http\Middleware\Shop\ShopTokenAuth::class,
2020-08-04 13:00:19 +02:00
'phantom_secret' => \App\Http\Middleware\PhantomSecret::class,
'contact_key_login' => \App\Http\Middleware\ContactKeyLogin::class,
2018-10-04 19:10:43 +02:00
];
}