我有一个RoR应用程序已经运行了相当一段时间,但经过最近的部署,办公室中的所有IE用户在导航到根URL时都会看到一个IE用户名和密码弹出对话框。该对话框名为"Connect to“,并具有”服务器在Web密码处需要用户名和密码“的文本。
问题的特点:
想法?是什么导致的?
有关配置的其他信息:
发布于 2009-12-11 18:23:37
啊!
因此,这实际上是源自“restful_authentication”方法的access_denied问题:
def access_denied
respond_to do |format|
format.html do
store_location
redirect_to new_session_path
end
format.any do
request_http_basic_authentication 'Web Password'
end
end
endformat.any行由IE执行(可能是IE中的一个bug ),但是所做的工作是更改"format.any do“行:
format.any(:js, :xml) do这仍然允许您的web服务连接到基本身份验证,同时阻止IE显示此对话框。
来源:http://rails_security.lighthouseapp.com/projects/15332/tickets/5-using-http-basic-authentication-with-ie-not-working
https://serverfault.com/questions/93206
复制相似问题