Symfony 3.0.1 CSRF token present but invalid

前端 未结 7 2453
刺人心
刺人心 2021-02-14 09:33

I am having this strange issue with a fresh Symfony 3.0.1 installation. I generated a new CRUD Controller with a Form PostType which contains an url and a title. Nothing fancy.<

7条回答
  •  说谎
    说谎 (楼主)
    2021-02-14 10:29

    I'm using Symfony 3.2.1 and it's working on one machine but not the other. No idea why.

    @Shrihari his answer led me to the following solution.

    My project also has cookie_secure: true. I updated config_dev.yml and added cookie_secure: false to the file.

    framework:
        session:
            cookie_secure: false
    

    This worked for me.

提交回复
热议问题