1

I have a Rails 3.2 app which works on multiple domain names eg: www.domain1.com, www.domain2.com, ... I use CASClient::Frameworks::Rails::Filter for some public pages. On those public pages, I need to show the current user logged in as well. Everything works, but the thing is that it usually redirects when the user firstly requests the page. It's really bad for SEO for those public pages to be indexed.

Let's say I have two domains: domain1.com and domain2.com. The user logged into domain1.com. In order to display the current user logged in both domain name, I must call CASClient::Frameworks::Rails::Filter. However, this method will redirect at the very first request for each domain. Is it possible not to do redirection while able to display the current user logged in for both domains?

Chamnap
  • 4,666
  • 2
  • 34
  • 46

1 Answers1

1

Could you clarify a bit more about what you mean show that they logged in? Based on what you wrote, if a user logs into domain1.com then they logged into domain2.com. You could:

1) at a minimum, check whether the user has logged on at all to a domain and then list out all domains. 2) because you mention seo, i'm assuming you have a database of some kind that stores a user's record and authenticates that they're okay as a user. you can update the user's record. if the data is normalized into a table of domains to which the user could connect, you can insert/update the user's record there. (i.e. a table userdomains like id, user_id, domain_id, lastupdated, signed_in_count) and pull from that table.

Plenty of other things you can do from the model, but in all the question may need more clarification.

Hope this helps

Michael
  • 1,786
  • 5
  • 23
  • 42