当我提交表单时,我收到错误页面(HTTP 状态 403 - 错误或缺少 CSRF 值),并且在表单中,如果我将方法指定为“get”,它工作正常。当我将“post”作为方法给出时,它会显示上述错误(即使它没有进入 Controller )。请给我解决方案。
<form action="${request.contextPath}/cart/voucher" method="post">
<input type="text" name="voucher"/>
<input type="submit" value="redeem">
</form
最佳答案
只需浏览此链接可能对您有帮助 https://spring.io/blog/2013/08/21/spring-security-3-2-0-rc1-highlights-csrf-protection/
关于HTTP 状态 403 - 错误或缺少 CSRF 值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30261577/