Why does the Laravel API return a 419 status code on POST and PUT methods?

后端 未结 3 1190
攒了一身酷
攒了一身酷 2020-11-28 13:12

I am trying to create a RESTful API by using Laravel. I have created my controller using php artisan make:controller RestController and this is my controlle

3条回答
  •  天命终不由人
    2020-11-28 14:09

    I solved this problem by changing my server cache setting. You can disable all of your caching systems (Nginx, Cloudflare, ...) to check it and then turn it on by applying QueryString + Cookie to prevent caching a page with old csrf token in it.

提交回复
热议问题