I am noticing that my sites session cookies are different between the two. If someone logs in on the www.mysite.com
they are not logged in on the non www
site. How can I fix this?
Asked
Active
Viewed 174 times
2

Deekor
- 9,144
- 16
- 69
- 121
2 Answers
1
Add domain for cookie like this:
cookies[:key] = {:value=>val,:domain=>'.mysite.com'}

yxf
- 485
- 2
- 5
-
I'm using a `session` can I do this there? – Deekor Dec 06 '13 at 05:25
-
`http://stackoverflow.com/questions/4060333/what-does-rails-3-session-store-domain-all-really-do` look this. – yxf Dec 06 '13 at 05:31
0
in config/initializers/session_store.rb
add , :domain => ".yourdomain.com"
to the end of the Application.config.session_store
line.

Deekor
- 9,144
- 16
- 69
- 121