How to disable CSRF Token in Laravel and why we have to disable it?

前端 未结 7 1333
攒了一身酷
攒了一身酷 2020-11-30 06:39

I want to see how I can disable CSRF token in Laravel and where I have to disable it. Is this good to disable it or not?

7条回答
  •  一生所求
    2020-11-30 06:58

    You can disable it in app/http/Kernel.php in the web middleware group.


    Is this good to disable it or not?

    No it's not. Read the Wikipedia page about CSRF to understand what CSRF is, the CSRF-Token prevents CSRF.

提交回复
热议问题