2017-06-18 54 views

回答

1

您可以禁用內置的CSRF保護Rails使用默認通過在控制器中添加(ApplicationController中或正在使用的)的protect_from_forgery方法:

protect_from_forgery with: :null_session 

或者也可通過使用skip_before_action「跳過「verify_authenticity_token實施。

+0

但必須確保通過Android應用程序進行更新,同時保持CSRF保護。 –

相關問題