Cakephp 3.5.6 disable CSRF Middleware for controller

后端 未结 3 1493
刺人心
刺人心 2020-12-10 08:20

I\'m trying to disable the CSRF check for a single controller (API), but I\'m unable to find how I\'m able to achieve this.

The pre 3.5.0 CSRF Component had the abil

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-10 08:57

    With Cakephp 3.8 I commented all methods implementations into class \vendor\cakephp\cakephp\src\Http\Middleware\CsrfProtectionMiddleware.php, so Csrf middleware is disabled :-)

提交回复
热议问题