Rails、Helicon 动物园和IIS 身份验证重定向循环
我已在运行 Windows Server 2008 + IIS 7.0 的服务器上设置了 Rails 站点。当导航到该网站时,浏览器因此代码而陷入重定向循环,
def authorize
if not signed_in?
previous_url = request.fullpath
redirect_to signin_path, :notice => "Please sign in to access this page"
end
end
我已从控制台启动它(rails s -e production
)并且没有任何问题。我还在我的开发计算机(Windows 7 + IIS 7.5)上设置了它,并且没有出现问题。此时我不知道从哪里开始探索。
I've setup a rails site on a server running Windows Server 2008 + IIS 7.0. When navigating to the site the browser gets caught in a redirect loop causes by this code
def authorize
if not signed_in?
previous_url = request.fullpath
redirect_to signin_path, :notice => "Please sign in to access this page"
end
end
I've started it from the console (rails s -e production
) and had no issues. I've also set it up on my development machine (Windows 7 + IIS 7.5) and not had issues. At this point I'm not sure where to start poking around.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的服务器给你一个错误日志吗?这可能是一个很好的起点。 (例如,在 Linux 上,如果我在终端中发出此命令:rails server -e dev2 --port 3010 它将向终端窗口吐出所有错误和许多其他内容,例如 sql 查询)。
Does your server give you an error log? That may be a good place to start. (For example on linux if I issue this command in terminal:
rails server -e dev2 --port 3010
it will spit out all errors and a lot of other things, like sql queries, to the terminal window).