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?
为Cookie添加域,如下所示:
cookies[:key] = {:value=>val,:domain=>'.mysite.com'}
在config/initializers/session_store.rb
, :domain => ".yourdomain.com"
在Application.config.session_store
行的末尾添加, :domain => ".yourdomain.com"
。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.