Thanks a lot for the fast response!

Haven't got time to give it a deep look, but plug and play method
didn't work.
Beaker evolved a lot lately so plobably this hack won't work with the
latest version.

It'll be great if probably Ben could take a look and hint on the best
practice way to achieve this.

On Aug 21, 5:53 pm, "Cezary Statkiewicz" <[EMAIL PROTECTED]>
wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to