[mod_python] Setting the cookie domain name using mod_python's Cookie class

L.Guruprasad lgp171188 at gmail.com
Tue Mar 2 09:36:07 EST 2010


Hi all,
Is it possible to set the domain for which a cookie is valid using
mod_python's Cookie class? I need to know about this because I want to
share cookies between 2 subdomains of a common superdomain.

This is how my workflow goes:

Login into Web app1 -> Authenticates and sets cookie for
subdomain1.domain.com.

Open Web app2 -> Check for session cookie, if it isn't there, redirect
to web app1 with referring_url set to web-app2 domain. Web app1, checks
for cookie in the browser which will be there if the user has logged in.
It takes the session id and sees if user of that session id has
privilege for app2 and if it is true, it sets cookie for
subdomain2.domain.com and redirects to the initially set referrer_url.

Is this possible with mod_python?

Regards,
Guruprasad


More information about the Mod_python mailing list