Securely persist session between https://secure.yourname.com and http://www.yourname.com on rails ap
Posted
by Matt
on Stack Overflow
See other posts from Stack Overflow
or by Matt
Published on 2010-06-05T02:19:56Z
Indexed on
2010/06/07
0:02 UTC
Read the original article
Hit count: 320
My rails site posts to a secure host (e.g. 'https://secure.yourname.com') when the user logs into the site. Session data is stored in the database, with the cookie containing only the session ID. The problem is that when the user returns to a non-https page, such as the home page (e.g. 'http://www.yourname.com') the user appears to have logged out. I believe the reason for this is that a separate cookie is stored for each host (www vs. secure). Is this correct?
What is the best secure way to persist the session between both the http and https sections of the site? Does anyone know of any plugins that address this problem?
The site runs on Heroku.
© Stack Overflow or respective owner