如何允许表单不带CSRF保护提交

继续讨论 通过 API 生成登录电子邮件

但那正是我想要的,然后我搜索了源代码中的 verify_authenticity_token,并发现我可以使用

    skip_before_action :check_xhr, :preload_json, :verify_authenticity_token

来让我的插件接受一个 post!

1 个赞