【发布时间】:2013-10-13 10:43:39
【问题描述】:
我在 Symfony 中创建了一个 rest api。它使用表单为客户端发送数据。 我在 setDefaultOptions 中使用了 'csrf_protection' => false,但仍然出现错误
CSRF 令牌无效。请尝试重新提交表单
【问题讨论】:
标签: symfony fosrestbundle
我在 Symfony 中创建了一个 rest api。它使用表单为客户端发送数据。 我在 setDefaultOptions 中使用了 'csrf_protection' => false,但仍然出现错误
CSRF 令牌无效。请尝试重新提交表单
【问题讨论】:
标签: symfony fosrestbundle
您是否通过NelmioApiDocBundle sanbox 测试了您的 api,或者您从前端的表单发送数据?您确定您没有将 csrf_protection 请求参数发送到您的 api 吗?
【讨论】: