Sharing sessions across subdomains

Has anyone else experienced this strange behavoir with sharing
sessions across subdomains?

I have in development.rb

ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:session_domain
=> ‘.localhost.com’)

If I create a session at foo.localhost.com then go bar.localhost.com a
session is created (with host localhost.com) and everything works
fine.

But if I then go to www.localhost.com which routes to a different
controller (via the request_routing plugin) another session is created
(with host www.localhost.com). Now if I navigate back to
foo.localhost.com the second empty session is picked up!

Any ideas?

Thanks,
Zack

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs