Home Production Rails App - Strange redirect to external sites
Reply: 0

Production Rails App - Strange redirect to external sites

user2021
1#
user2021 Published in June 25, 2018, 6:59 pm

I've just launched my first Rails 3.2.6 application to a production server. When someone goes to the home page this is handled by my IndexController and depending on the type of user logged in it might send it to an alternative URL.

Slightly simplified code example of what I have is this:

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

What I'm confused at, is I've been monitoring the logs for issues and it appears the redirect is going to random sites in Brazil for two IP addresses. Is this something that I should be worried about? Any information on helping me understand what's going on here would be very much appreciated.

See the log extract below where in the "Redirected to" URL, the domain is getting changed from what my site is to www.bradesco.com.br, www.bb.com.br or www.itau.com.br.

No one has reported any issues on the site, but I just wanted to try and understand this a little better.

Log Extract

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)
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.326438 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO