hostheaders

Using Express and Node, how to maintain a Session across subdomains/hostheaders

房东的猫 提交于 2019-11-27 03:41:00
I have a single node server that responds to requests and redirects a user based on host headers. The usage is that the static/home site lives at www and each user has their own sub domain (i.e. www.example.com and site.example.com). The routing is as per site.js. When the user is not logged in they are redirected to login. I am discovering that the session is not maintained when the user is redirected to their sub domain. I guess this is expected, but I am wondering if there is a way to maintain the same session across both sub domains. I was hoping that if they were logged in and returned to

Using Express and Node, how to maintain a Session across subdomains/hostheaders

自作多情 提交于 2019-11-26 09:31:27
问题 I have a single node server that responds to requests and redirects a user based on host headers. The usage is that the static/home site lives at www and each user has their own sub domain (i.e. www.example.com and site.example.com). The routing is as per site.js. When the user is not logged in they are redirected to login. I am discovering that the session is not maintained when the user is redirected to their sub domain. I guess this is expected, but I am wondering if there is a way to