I am creating a application with devise. there is two domain name 1) www.test.com and 2) www.hello.com both domain pointing to same application. so I want to share session(c
Rails maintain cookie which gets passed on to the server during every HTTP request. Please check the request headers under your network logs
You will see something like this
Cookie: some-junk-looking-session-data
So sharing session between two entirely different rails application is a security issue and rails don't allow this kind of behaviour.
However, there is an exception. A session can be shared if just the TLD changes. Eg: hello.com
& hello.org
.
YourApp::Application.config.session_store :cookie_store,
key: '_app_session',
domain: :all
References:
https://github.com/rails/rails/commit/1091a6e9b700bd713c8a6818761a27aa72b1fe93