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
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @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,
|
|
|
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
|
|
|
\App\Http\Middleware\TrustProxies::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\Session\Middleware\AuthenticateSession::class,
|
|
|
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
|
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
|
|
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
2019-02-17 11:34:46 +01:00
|
|
|
\App\Http\Middleware\StartupCheck::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,
|
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,
|
|
|
|
],
|
2018-10-18 07:04:36 +02:00
|
|
|
'db' => [
|
2018-10-19 05:45:55 +02:00
|
|
|
\App\Http\Middleware\SetDb::class,
|
2018-10-18 07:04:36 +02:00
|
|
|
],
|
2019-05-22 05:43:51 +02:00
|
|
|
'web_db' => [
|
|
|
|
\App\Http\Middleware\SetWebDb::class,
|
|
|
|
],
|
|
|
|
'url_db' => [
|
2018-10-24 12:24:09 +02:00
|
|
|
\App\Http\Middleware\UrlSetDb::class,
|
|
|
|
]
|
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-09-08 14:13:55 +02:00
|
|
|
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
2018-10-04 19:10:43 +02:00
|
|
|
];
|
|
|
|
}
|