but if i login into myapp.com in webpy
and then goto test.myapp.com it asks for username and passwd
how do we ensure that this subdomain uses the same session like yahoo
thanks
Krypton
Again, this is not really a web.py issue, but I googled for "cookies
subdomains", and up came the following link:
http://content.websitegear.com/article/subdomain_tips.htm
It suggests that when you write a cookie, set the domain to .domain.tld,
and it will be accessible to all subdomains. When a user types
domain.tld in the browser, redirect them to www.domain.tld
Cheers,
Craig
Use flup's session. I ask Allan Saddi to implement this feature and an
hour after everything worked as expected.
def session_mw(app):
return SessionMiddleware(DiskSessionStore(timeout=5), app)
and this is the login code is from webpy authentication from
webpy.infogami.com/src
use something like that:
def session_mw(app):
return SessionMiddleware(DiskSessionStore, app,
cookieAttributes={'expires':7*24*60*60, 'domain':'.domain.com'})
where expires is how long the session reference is kept and domain the
global used domain.