X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ae95d0a239cf5f7406f6af7e2b25fd5be94a8ad0..refs/pull/448/head:/app/Http/Kernel.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 9f3444c88..839590c95 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -1,6 +1,4 @@ - [ + \BookStack\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \BookStack\Http\Middleware\VerifyCsrfToken::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + \BookStack\Http\Middleware\Localization::class + ], + 'api' => [ + 'throttle:60,1', + 'bindings', + ], ]; /** @@ -26,9 +42,10 @@ class Kernel extends HttpKernel * @var array */ protected $routeMiddleware = [ - 'auth' => \Oxbow\Http\Middleware\Authenticate::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'auth' => \BookStack\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, - 'guest' => \Oxbow\Http\Middleware\RedirectIfAuthenticated::class, - 'perm' => \Oxbow\Http\Middleware\PermissionMiddleware::class + 'guest' => \BookStack\Http\Middleware\RedirectIfAuthenticated::class, + 'perm' => \BookStack\Http\Middleware\PermissionMiddleware::class ]; }