Commit c3e3d9dc authored by Taylor Otwell's avatar Taylor Otwell

Include CSRF middleware in base install for easy override / whitelist.

This makes it easy to skip CSRF verification for things like web hooks
and such from GitHub / Stripe.
parent 9b9c12fc
...@@ -15,7 +15,7 @@ class Kernel extends HttpKernel { ...@@ -15,7 +15,7 @@ class Kernel extends HttpKernel {
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse', 'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
'Illuminate\Session\Middleware\StartSession', 'Illuminate\Session\Middleware\StartSession',
'Illuminate\View\Middleware\ShareErrorsFromSession', 'Illuminate\View\Middleware\ShareErrorsFromSession',
'Illuminate\Foundation\Http\Middleware\VerifyCsrfToken', 'App\Http\Middleware\VerifyCsrfToken',
]; ];
/** /**
......
<?php namespace App\Http\Middleware;
use Closure;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
class VerifyCsrfToken extends BaseVerifier {
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
return parent::handle($request, $next);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment