# Edge (2.3.0) session\_domain cookies problem

**URL:** <https://www.ruby-forum.com/t/edge-2-3-0-session-domain-cookies-problem/158910>\
**Category:** Rails\
**Created:** [January 29, 2009, 10:28am UTC](https://www.ruby-forum.com/t/edge-2-3-0-session-domain-cookies-problem/158910 "2009-01-29T10:28:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LesFreeman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@LesFreeman](https://www.ruby-forum.com/u/LesFreeman)\
**Post date:** [January 29, 2009, 10:28am UTC](https://www.ruby-forum.com/t/edge-2-3-0-session-domain-cookies-problem/158910/1 "2009-01-29T10:28:19Z")

</div>

Hello,  
I am working on a project that uses subdomain keyed accounts.  
Everything works great (using SubdomainFu for much of that heavly  
lifting) until I get to storing sessions across the subdomains. I want  
the entire site to share cookies, such as the auth\_token from  
restful\_authentication.

I’ve read numerous blog posts regarding this setup, and everyone seems  
to say that if you set the session\_domain everything should work fine:

#development.rb:  
ActionController::Base.session\_options[:session\_domain] =  
‘equvents.local’

I’ve also tried:  
ActionController::Base.session\_options[:session\_domain] =  
‘.equvents.local’

And what seems to be an older method:  
ActionController::CgiRequest::DEFAULT\_SESSION\_OPTIONS.update  
(:session\_domain =\> “.equvents.local”)

The trouble is, this isn’t having any effect on the domain my app  
stores cookies for. The cookies are still getting set individually for  
www.equvents.local, testaccount.equvents.local, equvents.local, etc.

What am I missing?

Thanks so much for your help!  
Les Freeman

---

<div class="post-metadata">

**Author:** ![LesFreeman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc29f/32.png) [@LesFreeman](https://www.ruby-forum.com/u/LesFreeman)\
**Post date:** [January 30, 2009, 5:41am UTC](https://www.ruby-forum.com/t/edge-2-3-0-session-domain-cookies-problem/158910/2 "2009-01-30T05:41:42Z")

</div>

It appears that, at least in Edge 2.3.0, you no longer  
use :session\_domain, but just :domain:

config.action\_controller.session = {  
:domain =\> “.equvents.local”  
}

I’ve not fully tested yet, but things seem to be working so far.  
Hopefully this will save someone else some hair pulling.  
Les
