disable csrf in laravel for specific route

前端 未结 3 2073
情歌与酒
情歌与酒 2020-12-05 06:26

I\'ve a payment system, where data is submitted to 3rd party site and than hauled back...

When data returns it hits specific url lets say /ok route. $_REQUEST[

3条回答
  •  离开以前
    2020-12-05 06:51

    Since version 5.1 Laravel's VerifyCsrfToken middleware allows to specify routes, that are excluded from CSRF validation. In order to achieve that, you need to add the routes to $except array in your App\Http\Middleware\VerifyCsrfToken.php class:

    See the docs for more information.

提交回复
热议问题