Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session (and logged in user) not maintained across subdomains #2

Open
fortuity opened this issue Sep 7, 2010 · 0 comments
Open

Session (and logged in user) not maintained across subdomains #2

fortuity opened this issue Sep 7, 2010 · 0 comments

Comments

@fortuity
Copy link
Owner

fortuity commented Sep 7, 2010

If you are having this problem: You log in as a user, and change to some subdomain and you're no longer logged in as the current user, and when your return to the main domain you're still logged in.

To resolve this, and maintain the current user across subdomains, try setting the session domain in environments/production.rb:
config.action_controller.session = { :domain => ‘.YOURDOMAIN.COM’ }
(note the leading dot on the domain name).

See this blog post for more information:
http://garrickvanburen.com/archive/rails-cookie-settings-for-cross-subdomain-sessions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant