-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seems response header always has set-cookie, even use same session #85
Comments
possible workaround def _set_cookie_props(self, request, response):
req = get_request_container(request)
+ if request.cookies.get(self.cookie_name) == req[self.session_name].sid:
+ return # session_id same with client, do nothing
+
response.cookies[self.cookie_name] = req[self.session_name].sid
response.cookies[self.cookie_name]["httponly"] = self.httponly
|
Is this still an issue? |
that not really break normal function maybe it's by design? I see other webserver not refresh cookie so frequently |
Ahh, I see. I am new to this lib, so I cannot speak to the design decisions. Maybe that should be a configurable setting. |
about cookie login expire time, I see there are some different design:
|
That makes sense. I guess what I am caught up on is that I have not thought thru the consequences of this and how changing the behavior would impact existing installations. |
use the aioredis demo:
https://sanic-session.readthedocs.io/en/latest/using_the_interfaces.html#redis-aioredis
and response header always has set-cookie, even use same session
// event comment out
foo +=1
Is this normal?
// use set-cookie only when cookie has change ?
detail
version
chrome test
curl test:
every request will got cookie with new expires value.
The text was updated successfully, but these errors were encountered: