2018-10-04 19:10:43 +02:00
|
|
|
<?php
|
2019-05-11 05:32:07 +02:00
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2020-01-07 01:13:47 +01:00
|
|
|
* @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-06-18 12:52:25 +02:00
|
|
|
\App\Http\Middleware\Cors::class,
|
|
|
|
|
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-06-18 12:52:25 +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',
|
|
|
|
],
|
2019-07-16 04:38:11 +02:00
|
|
|
'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 = [
|
2018-10-15 07:00:48 +02:00
|
|
|
'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,
|
2018-10-15 07:00:48 +02:00
|
|
|
'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,
|
2019-07-12 07:03:30 +02:00
|
|
|
'domain_db' => \App\Http\Middleware\SetDomainNameDb::class,
|
2019-11-16 04:12:29 +01:00
|
|
|
'email_db' => \App\Http\Middleware\SetEmailDb::class,
|
|
|
|
'invite_db' => \App\Http\Middleware\SetInviteDb::class,
|
2019-10-22 13:27:03 +02:00
|
|
|
'password_protected' => \App\Http\Middleware\PasswordProtection::class,
|
2019-09-08 14:13:55 +02:00
|
|
|
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
2019-11-04 01:22:59 +01:00
|
|
|
'portal_enabled' => \App\Http\Middleware\ClientPortalEnabled::class,
|
2019-12-10 21:25:54 +01:00
|
|
|
'url_db' => \App\Http\Middleware\UrlSetDb::class,
|
|
|
|
'web_db' => \App\Http\Middleware\SetWebDb::class,
|
|
|
|
'api_db' => \App\Http\Middleware\SetDb::class,
|
2020-07-28 13:58:15 +02:00
|
|
|
'company_key_db' => \App\Http\Middleware\SetDbByCompanyKey::class,
|
2019-12-10 21:25:54 +01:00
|
|
|
'locale' => \App\Http\Middleware\Locale::class,
|
2020-05-28 17:39:38 +02:00
|
|
|
'contact.register' => \App\Http\Middleware\ContactRegister::class,
|
2020-07-28 13:58:15 +02:00
|
|
|
'shop_token_auth' => \App\Http\Middleware\Shop\ShopTokenAuth::class,
|
2020-08-04 13:00:19 +02:00
|
|
|
'phantom_secret' => \App\Http\Middleware\PhantomSecret::class,
|
2018-10-04 19:10:43 +02:00
|
|
|
];
|
|
|
|
}
|