2008/8/21 Pavel Skvazh <[EMAIL PROTECTED]>: > > The case is that when I work with sub-domain (i.e. my.example.com), > set some session variables and then go to some other domain (i.e. > www.example.com) the session is empty. No cookie is issued as well. > > Have anyone faced this issue before and what's the best practice to > keep the session persistent across sub_domains
Yes. In general: * setup routing with subdomain=True: http://routes.groovie.org/manual.html#sub-domain-support * add to your config.ini base_domain = yourbasedomain.com * add BaseController.__before__ code: if session.is_new: session.cookie[session.key]['domain'] = '.%s'%request.environ['paste.config']['app_conf']['base_domain'] session.cookie[session.key]['path']= '/' session.request['cookie_out'] = session.cookie[session.key].output(header='') Note however, that this trick is pre 0.9.6. Now it might be easier to setup. Best regards, Cezary Statkiewicz -- Cezary Statkiewicz - http://thelirium.net rlu#280280 gg#5223219 jabber://[EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
