For the question Does web2py set automatic cookies reply by Anthony was
There's only the session cookie that gets set automatically (though there
is one for each app, including the admin app).
If you want to completely disable sessions, including sending the session
cookie, you can add the following anywhere in your routes.py file:
from gluon.settings import global_settings
global_settings.web2py_disable_session = True
That will disable sessions for all apps. If you want to disable sessions
for only some apps and you do not rely on the parameter-based rewrite
system, you can use the pattern-based rewrite system as follows:
routes_in = [('/welcome', '/welcome', dict(web2py_disable_session=True)]
That will add web2py_disable_session to the global environment only for
requests to the welcome app.
Note, the share.js widget included by default in the footer of the default
layout.html also sets some cookies, so you would probably want to remove
that from the layout as well.
Anthony
So i tried that way. Is this not the way?
On Friday, January 8, 2016 at 4:30:17 PM UTC+5:30, T.R.Rajkumar wrote:
>
> I have in my routes.py in web2py folder the following.
> routes_in = (
> ('/ts2', '/web_ts2_site/home/home'),
>
> )
> routes_out = ()
>
> Now I want to disable session for web_ts2_site app. If I add the below it
> gives error. How to go about that?
>
> routes_in = [('/web_ts2_site', '/web_ts2_site', dict(
> web2py_disable_session=True)]
>
> Thank you for reading.
>
--
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/d/optout.