3

由于rails安全问题升级后设计2.2.3,登录前总是显示登录通知消息,当我尝试登录时,它返回

Started POST "/users/sign_in" for 127.0.0.1 at 2013-02-17 00:55:34 +0530
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"Uri7L+RS+l3Nwjln1cBLfwxfMWEdEYz3gWEHyXpbRPc=", "user"=>{"email"=>"abcdedf@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
Completed 401 Unauthorized in

导轨版本:3.1.x

4

2 回答 2

2

这种奇怪的行为是由于控制器动作缓存而出现的,在 environment/production.rb 禁用它解决了这个问题。

于 2013-02-20T05:30:12.013 回答
0

试试这个

在 config/initializers/devise.rb

默认为真。

config.http_authenticatable_on_xhr = false
于 2013-02-16T19:59:07.333 回答