According to the book, here's how web2py sets the session cookie:
 
response.cookies[response.session_id_name] = response.session_id
response.cookies[response.session_id_name]['path'] = "/" 
 
Perhaps it would work with subdomains if you added (maybe in a model file):
 
 response.cookies[response.session_id_name]['domain'] = ".habrahabr.ru"
 
I think that's supposed to send the cookie to all subdomains (not sure about 
other implications for sessions and security). You might also need some 
logic so the domain is not set when running on localhost.
 
Anthony 
 

On Monday, April 11, 2011 11:40:34 AM UTC-4, LightOfMooN wrote:

> But that is in all browsers (we try IE, FF, Chrome, Safari). 
> I have seen many sites with subdomain structure, where there are one 
> login for all site structure. 
> For example, habrahabr.ru, where subdomain is username. 
> http://alexkucherov.habrahabr.ru/ 
> http://lugansk.habrahabr.ru/ 
> http://devart.habrahabr.ru/ 
>
> So, is there a way in web2py to log in all subdomains? 
>
> On 11 апр, 19:39, Massimo Di Pierro <[email protected]> 
> wrote: 
> > The problem I can thnk of is that browser perceives them as different 
> > domains and does not share cookies required for session info. 
> > 
> > On Apr 11, 12:35 am, LightOfMooN <[email protected]> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > No solutions for that? 
> > 
> > > On 10 апр, 23:18, LightOfMooN <[email protected]> wrote: 
> > 
> > > > Hello. 
> > > > I have site based on subdomains, but all of them are the one project. 
>
> > 
> > > > for example: 
> > 
> > > > city1.cities.ru 
> > > > city2.cities.ru 
> > > > city3.cities.ru 
> > 
> > > > if I login in one subdomain, I should login else in all of others. 
> > 
> > > > How to fix it? 
> > > > I just want one login for all cities.ru subdomains 
> > 
> > > > thx

Reply via email to