0
我創建了一個新的rails-api應用程序,並向其添加了地址模型,然後安裝了rails_admin。並且每當我嘗試添加行時,我都會得到422
s無法使用rails_api驗證CSRF:rails_admin
我可以看到CSRF令牌已經在JSON中發送,但它說它是無效的。
Processing by RailsAdmin::MainController#new as HTML
Parameters: {"utf8"=>"âœ「", "authenticity_token"=>"9PP0EREx/cTK2TVtMp38ao/U9QCu6pjwmvV4fxIGEwTjZvGUfTcz7hpWL85UR/7qO3w+kytA2HD98+u7yiy3wg==", "address"=>{"door_no"=>"229", "street"=>"", "area"=>"", "city"=>"", "state"=>"", "pin"=>"", "code"=>""}, "return_to"=>"", "_save"=>"", "model_name"=>"address"}
Can't verify CSRF token authenticity.
Completed 422 Unprocessable Entity in 0ms (ActiveRecord: 0.0ms)
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken)
什麼可能是錯的?寶石中有什麼可能?