Ruby on rails 3 生产Rails应用程序-奇怪的重定向到外部站点
我刚刚在生产服务器上启动了我的第一个Rails 3.2.6应用程序。当有人进入主页时,这是由我的IndexController处理的,根据登录用户的类型,它可能会将其发送到另一个URL 稍微简化的代码示例如下:Ruby on rails 3 生产Rails应用程序-奇怪的重定向到外部站点,ruby-on-rails-3,redirect,production-environment,Ruby On Rails 3,Redirect,Production Environment,我刚刚在生产服务器上启动了我的第一个Rails 3.2.6应用程序。当有人进入主页时,这是由我的IndexController处理的,根据登录用户的类型,它可能会将其发送到另一个URL 稍微简化的代码示例如下: def index path = new_user_session_url #default path if current_user path = users_admin_index_path #admin path end redirect_to
def index
path = new_user_session_url #default path
if current_user
path = users_admin_index_path #admin path
end
redirect_to path, :notice => flash[:notice], :alert => flash[:alert]
end
我感到困惑的是,我一直在监控日志中的问题,似乎重定向到了巴西的随机站点,寻找两个IP地址。这是我应该担心的事情吗?如果有任何信息能帮助我了解这里发生了什么,我将不胜感激
请参阅下面的日志摘录,其中在“重定向到”URL中,域将从我的站点更改为www.bradesco.com.br、www.bb.com.br或www.itau.com.br
没有人在网站上报告任何问题,但我只是想试着更好地理解这一点
原木提取物
我在我的一个Rails暂存服务器上看到了同样的情况。我认为问题在于,您需要拒绝所有不适用于预期域的流量 在您的nginx设置中类似于以下内容(如果您正在使用nginx):
不知道这交通的意义是什么?在嗅探网络流量的同时,使用其他人的Rails应用程序作为钓鱼网站的新方式?这似乎有太多的变量,无法成为一种有效的技术。谢谢,我正在使用Passenger,但我将看看如何为我的应用程序做到这一点,并在本周末对其进行测试。我会告诉你我怎么走的。
Started GET "/" for 65.111.177.188 at 2012-08-10 00:20:10 -0400
Processing by Home::IndexController#index as HTML
Redirected to http://www.itau.com.br/home
Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
Started GET "/" for 65.111.177.188 at 2012-08-10 00:20:10 -0400
Processing by Home::IndexController#index as HTML
Redirected to http://www.bradesco.com.br/home
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
Started GET "/" for 65.111.177.188 at 2012-08-10 00:20:10 -0400
Processing by Home::IndexController#index as HTML
Redirected to http://www.bb.com.br/home
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
Started GET "/" for 64.251.28.71 at 2012-08-09 22:00:20 -0400
Processing by Home::IndexController#index as HTML
Redirected to http://www.bradesco.com.br/home
Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
server {
listen 80 default_server;
server_name _;
return 444;
}