I am trying to implement a session in ruby on Rails that will be unique for the subdomain that created it. I don’t want to share the session with any subdomain:
Domain that created the session: test1.test.com
config/initializer/session_storage.rb
Test::Application.config.session_store :cookie_store, key: Test23
When I set like this if test2.test.com make a request to test1.test.com the session is sent.
Test::Application.config.session_store :cookie_store, key: Test23, domain: 'test1.test.com'
When I set like this if test2.test.com make a request to test1.test.com the session is sent too.
Test::Application.config.session_store :cookie_store, key: Test23, domain: '.test1.test.com'
When I set like this if test2.test.com make a request to test1.test.com the session is sent too.
Test::Application.config.session_store :cookie_store, key: Test23, domain: 'test1.test.com', :tld_length => 2
When I set like this if test2.test.com make a request to test1.test.com the session is sent too.