Cookies/Session Management

All,

I tried to take this to my host but they’ve deferred to me which means
I’m deferring to the community.

I’ve currently got an issue where my application is giving a user two
distinct sessions/cookies - not a good thing. The first session is
allocated when a user hits www.foo.com for the first time, however, if
the user then hits foo.com (sans the www), my application issues this
user a new session.

This sounds like a hosting issue but they’ve indicated it’s in the app.
Any pointers? Suggestions on where to start digging? Seems like the
answer is to tail rails to issue cookies for *.foo.com and not per
subdomain (www.foo.com)…

TIA,
Cory

Well, you can work around this issue by making your website work on
www.foo.com and all other subdomains to redirect to your website.

If you tell rails to use *.foo.com for your cookie (dunno how to do
that), you are going to have problems if you decide to use a subdomain
for something else, like a forum, that usually sets a cookie on its
own.

As it is, this is indeed an issue with you/app and not the web host.

On Dec 12, 8:06 pm, Cory W. [email protected]

This should do the trick:
http://wiki.rubyonrails.org/rails/pages/HowtoChangeSessionOptions

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