Mod python set cookie for all subdomains

Graham Dumpleton Graham.Dumpleton at gmail.com
Sun Dec 2 20:18:38 EST 2007


On Dec 3, 11:44 am, Abandoned <best... at gmail.com> wrote:
> Hi..
> I set cookie fromwww.domain.combut i'cant read this cookie from
> subdomain.domain.com
> How can i set cookie for all subdomains ?
>
> My set cookie code is:
> cookie = Cookie.Cookie('Login-Data', data)
> cookie.expires = time.time() + 9920000
> Cookie.add_cookie(req, cookie)

Having created the cookie do:

  cookie.domain = 'domain.com'

Graham




More information about the Python-list mailing list