Disable CSRF token on login form
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am using Symfony2.0 and FOSUserBundle, and would like to disable the csrf token on my login form. I have disabled the csrf protection globally on my website in my config.yml: framework : csrf_protection : enabled : false This is working well, there is no csrf field added to my forms. However, this does not apply to the login form. On this form only, I get an "Invalid CSRF Token" error if I don't include the token in the form with: How can I disable the CSRF token on the login form? 回答1: If you just go to your security.yml file