开发者

can I have my domain authenticated for regualr domain and www.mydomain?

开发者 https://www.devze.com 2023-01-24 02:49 出处:网络
How can I have user automatically logs in to my website if he goes to mydomain.com or w开发者_开发知识库ww.mydomain.com?The problem is that cookies set on the main domain are not automatically accessi

How can I have user automatically logs in to my website if he goes to mydomain.com or w开发者_开发知识库ww.mydomain.com?


The problem is that cookies set on the main domain are not automatically accessible on the subdomain. Authentication in your application is handled through sessions, which are persisted between requests by a cookie. That the cookie should be accessible to your subdomains has to be set explicitly when the cookie is related. This question dealt with how:

Problem with sessions, subdomains and authlogic in Rails

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号