What you need to use is response.cookies response.cookies['your_cookie_name''] = value_you_want_to_save response.cookies['your_cookie_name']['domain'] = '.example.com' response.cookies['your_cookie_name']['path'] = '/' response.cookies['your_cookie_name']['expires'] = 7 * 24 * 3600
This would set a cookie for example.com, subdomains and all paths, that would not expire for a week. Quinta-feira, 5 de Dezembro de 2013 19:22:08 UTC, Marin Pranjić escreveu: > > Hi, > > I have two subdomains for one app, and I need to use both. > So I have to set "Domain" header in session cookie to the domain root (. > domain.com). > Where should I put that code? Not sure how exactly to do it for session > cookie. > > Marin > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

