如何在铁轨中修复不匹配的CSRF真实性令牌?
如果我正确理解了这一点,则输入真实性令牌应该与Head元素中的上述值匹配。
提交设计注册表格时,我会遇到422个无法实现的实体错误。
我确实删除了我的master.key
和re-ran rails信誉:编辑
以重生rails_master_key
和secret_key_key_base
。
我相信这里的问题是因为这些值不匹配,因此没有处理该表格,导致设计用户没有创建。
If I am understanding this correctly the input authenticity token should be matching the value above in the head element.
When submitting the devise sign up form I get a 422 Unprocessible Entity error.
I did delete my master.key
and re-ran rails credentitals:edit
to regenerate the RAILS_MASTER_KEY
and SECRET_KEY_BASE
.
I believe the issue here is since these values are not matching, the form is not being processed resulting in the devise User not being created.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
delete config/master.key和config/recortentials.yml.enc。然后运行Rails凭据:编辑,它将制作一个新密钥和加密的凭据文件。不要忘记重新启动导轨服务器。
Delete config/master.key and config/credentials.yml.enc. Then run rails credentials:edit and it will make a new key and encrypted credentials file. Don't forget to restart the rails server.