CSRF token is invalid when calling rest post api from php Client

安稳与你 提交于 2019-12-13 01:26:37

问题


I have created a rest api in Symfony. It uses form for the client to send the data. I have used 'csrf_protection' => false in setDefaultOptions, but still getting the error

The CSRF token is invalid. Please try to resubmit the form


回答1:


Did you test your api over NelmioApiDocBundle sanbox, or your sending data from form on frontned side? Are you sure that your not sending csrf_protection requsest parameter to your api?



来源:https://stackoverflow.com/questions/19344272/csrf-token-is-invalid-when-calling-rest-post-api-from-php-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!