Automatically sets rack session domain to the current one
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
rack-auto-session-domain.gemspec

README.md

rack-auto-session-domain

This rack middleware automatically sets the rack session domain to the current domain.

eg. env["rack.session.options"][:domain] = 'domain1.com'

This is handy if you want your rack app to serve multiple domains and have access to the session data across all subdomains. For example, let's say your app serves the following domains:

and..

The session cookies will now automatically be accessible across all subdomains on *.domain1.com and *.domain2.co.uk respectively.

Source

https://github.com/GavinJoyce/rack-auto-session-domain