2017-06-18 47 views

回答

1

您可以禁用内置的CSRF保护Rails使用默认通过在控制器中添加(ApplicationController中或正在使用的)的protect_from_forgery方法:

protect_from_forgery with: :null_session 

或者也可通过使用skip_before_action“跳过“verify_authenticity_token实施。

+0

但必须确保通过Android应用程序进行更新,同时保持CSRF保护。 –

相关问题