This project is archived and is in readonly mode.
Share session between subdomains
-
Guillermo Álvarez
Here is the patch.
-
Guillermo Álvarez
This patch is so simple, and just cover most of the cases i know, so for most complicated cases like 3th level domain, you must be explicit. For example:
If you want to share session between *.google.co.uk you do:
Rails.application.config.session_store :cookie_store, :key => '_app_session', :domain => ".google.co.uk" -
Guillermo Álvarez
- Tag changed from cookie_store, session_store.rb to 3.x, cookie_store, session_store.rb
-
Repository
- State changed from new to resolved
(from [c4d6245e875bbb276c122a5a401422d341dac4df]) Add support for multi-subdomain session by setting cookie host in session cookie so you can share session between www.example.com, example.com and user.example.com. [#4818 Share session between subdomains state:resolved]
Signed-off-by: David Heinemeier Hansson david@loudthinking.com
http://github.com/rails/rails/commit/c4d6245e875bbb276c122a5a401422... -
Repository
(from [330a89072a493aafef1e07c3558964477f85adf0]) Revert "Add support for multi-subdomain session by setting cookie host in session cookie so you can share session between www.example.com, example.com and user.example.com. [#4818 Share session between subdomains state:resolved]"
It does not work for domains like co.uk and com.br.
This reverts commit c4d6245e875bbb276c122a5a401422d341dac4df.
http://github.com/rails/rails/commit/330a89072a493aafef1e07c3558964... -
Rizwan Reza
(from [44830ead1c88e1c45124133ce3e2ed9f890f42de]) Add support for multi-subdomain session by setting cookie host in session cookie so you can share session between www.example.com, example.com and user.example.com. [#4818 Share session between subdomains state:resolved]
This reverts commit 330a89072a493aafef1e07c3558964477f85adf0.
http://github.com/rails/rails/commit/44830ead1c88e1c45124133ce3e2ed... -
Bryce Thornton
I really like this new ":domain => :all" option, but I'm getting a "ActionController::InvalidAuthenticityToken" exception when trying to use it. Everything works fine when specifying the domain directly.
-
iGEL
Here is a list of all domains with several levels (like .co.uk): http://publicsuffix.org/ It's maintained by the Mozilla Project.
-
Fjan
This patch doe produce a cookie that doesn't conform to specs if the host you are accessing is "localhost" or an IP address. The browsers I tried don't seem to care about this but Unix' wget will complain about it.
