2015-12-13 04:42:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http;
|
|
|
|
|
|
|
|
use App\Http\Middleware\Authenticate;
|
2016-01-03 11:32:38 +00:00
|
|
|
use App\Http\Middleware\GetUserFromToken;
|
2016-06-13 09:04:42 +00:00
|
|
|
use App\Http\Middleware\ObjectStorageAuthenticate;
|
2017-02-14 06:53:02 +00:00
|
|
|
use App\Http\Middleware\TrimStrings;
|
2016-11-13 15:05:24 +00:00
|
|
|
use App\Http\Middleware\UseDifferentConfigIfE2E;
|
2016-09-26 06:30:00 +00:00
|
|
|
use Illuminate\Auth\Middleware\Authorize;
|
2015-12-13 04:42:28 +00:00
|
|
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
|
|
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
|
2017-02-14 06:53:02 +00:00
|
|
|
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
|
|
|
|
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
|
2017-02-15 03:19:24 +00:00
|
|
|
use Illuminate\Routing\Middleware\SubstituteBindings;
|
|
|
|
use Illuminate\Routing\Middleware\ThrottleRequests;
|
2015-12-13 04:42:28 +00:00
|
|
|
|
|
|
|
class Kernel extends HttpKernel
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The application's global HTTP middleware stack.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middleware = [
|
|
|
|
CheckForMaintenanceMode::class,
|
2016-11-13 15:05:24 +00:00
|
|
|
UseDifferentConfigIfE2E::class,
|
2017-02-14 06:53:02 +00:00
|
|
|
ValidatePostSize::class,
|
|
|
|
TrimStrings::class,
|
|
|
|
ConvertEmptyStringsToNull::class,
|
2015-12-13 04:42:28 +00:00
|
|
|
];
|
|
|
|
|
2016-09-26 06:30:00 +00:00
|
|
|
/**
|
|
|
|
* The application's route middleware groups.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $middlewareGroups = [
|
|
|
|
'web' => [
|
|
|
|
// Koel doesn't use any default Laravel middleware for web.
|
|
|
|
],
|
|
|
|
'api' => [
|
|
|
|
'throttle:60,1',
|
|
|
|
'bindings',
|
|
|
|
],
|
|
|
|
];
|
|
|
|
|
2015-12-13 04:42:28 +00:00
|
|
|
/**
|
|
|
|
* The application's route middleware.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $routeMiddleware = [
|
|
|
|
'auth' => Authenticate::class,
|
2015-12-29 01:35:22 +00:00
|
|
|
'jwt.auth' => GetUserFromToken::class,
|
2016-06-13 09:04:42 +00:00
|
|
|
'os.auth' => ObjectStorageAuthenticate::class,
|
2016-09-26 06:30:00 +00:00
|
|
|
'bindings' => SubstituteBindings::class,
|
|
|
|
'can' => Authorize::class,
|
2016-09-26 07:33:53 +00:00
|
|
|
'throttle' => ThrottleRequests::class,
|
2015-12-13 04:42:28 +00:00
|
|
|
];
|
|
|
|
}
|