sufiyan7

Joined

10 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Sharing Cookies with Subdomains in Rails Discussion

My rails app works on subdomains like
mother.lvh.com
friend.lvh.com
brother.lvh.com

Each of these subdomains are considered as separate groups which has their own users. Users from one subdomain cannot login into another subdomain.
since domain: :all share the cookie in every sub domain.
Is there any way to set cookie so that one user's cookie from his subdomain (for eg friend.lvh.com) cannot be shared to different subdomains ?
each subdomain's user has their own cookies

Suppose
User 1 from mother.lvh.com should have value 'mother.lvh.com' in the domain of the cookie
User 2 from friend.lvh.com should have value 'friend.lvh.com' in the domain of the cookie

Can you help me on this??