Skip to content

GavinJoyce/rack-auto-session-domain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Automatically sets rack session domain to the current one

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages