Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Beaker session across multiple sub-domains
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Pavel Skvazh  
View profile  
 More options Aug 21 2008, 9:13 am
From: Pavel Skvazh <pavel.skv...@gmail.com>
Date: Thu, 21 Aug 2008 06:13:10 -0700 (PDT)
Local: Thurs, Aug 21 2008 9:13 am
Subject: Beaker session across multiple sub-domains
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

Thanks!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cezary Statkiewicz  
View profile  
 More options Aug 21 2008, 9:53 am
From: "Cezary Statkiewicz" <c.statkiew...@gmail.com>
Date: Thu, 21 Aug 2008 15:53:37 +0200
Local: Thurs, Aug 21 2008 9:53 am
Subject: Re: Beaker session across multiple sub-domains
2008/8/21 Pavel Skvazh <pavel.skv...@gmail.com>:

> 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://ce...@jabber.org


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pavel Skvazh  
View profile  
 More options Aug 21 2008, 10:43 am
From: Pavel Skvazh <pavel.skv...@gmail.com>
Date: Thu, 21 Aug 2008 07:43:54 -0700 (PDT)
Local: Thurs, Aug 21 2008 10:43 am
Subject: Re: Beaker session across multiple sub-domains
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" <c.statkiew...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Bangert  
View profile  
 More options Aug 21 2008, 12:09 pm
From: Ben Bangert <b...@groovie.org>
Date: Thu, 21 Aug 2008 09:09:25 -0700
Local: Thurs, Aug 21 2008 12:09 pm
Subject: Re: Beaker session across multiple sub-domains

On Aug 21, 2008, at 6:13 AM, Pavel Skvazh wrote:

> 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

You need to specify to use just the last portion (.example.com) for  
the beaker cookie. You can set this in your ini file with:
beaker.session.cookie_domain = .example.com

Cheers,
Ben

  smime.p7s
3K Download

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pavel Skvazh  
View profile  
 More options Aug 25 2008, 9:17 am
From: Pavel Skvazh <pavel.skv...@gmail.com>
Date: Mon, 25 Aug 2008 06:17:04 -0700 (PDT)
Local: Mon, Aug 25 2008 9:17 am
Subject: Re: Beaker session across multiple sub-domains
Solved. Thanks as usual, Ben!

On Aug 21, 8:09 pm, Ben Bangert <b...@groovie.org> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google