Hi everyone,
I'm facing some problems trying to set cookie path with pyramid_beaker.
As far as I can understand from the doc of beaker and pyramid_beaker,
path is not taken from settings in the .ini file but must be set in
python code using session.path = '/mypath'. In fact I tried setting
session.path in the ini but looking at the set-cookie header it is
ignored by beaker, as expected.
I 'solved' by setting __getattribute__ in my request subclass , i.e.
def __geattribute__(self, attr):
value = super(Request, self).__geattribute__(attr)
if attr == 'session':
value.path = '/my_cookie_path/'
return value
and it works, the cookie has the correct path set, but it feels hacky
and I think is sub-optimal, so I'm seeking advice.
Thank you in advance,
--
Giacomo Bagnoli (@gbagnoli)
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.