2016年11月23日 星期三

Excluding Routes from the CSRF Middleware in Laravel 5.1

Whoops! I missed a feature from my Laravel 5.1 review!
It's now super easy to exclude specific routes from your CSRF middleware:
// app/Http/Middleware/VerifyCsrfToken
protected $except = [
 'webhook/*'
];
Learn more about how, and why, it works at Laravel News': Excluding Routes from the CSRF Middleware.

from : https://mattstauffer.co/blog/excluding-routes-from-the-csrf-middleware-in-laravel-5.1

沒有留言:

wibiya widget