forked from orbit-oss/flask
Backout last change, save_cookie by itself does that
This commit is contained in:
parent
585bf02ee0
commit
d90b1f1705
1 changed files with 6 additions and 7 deletions
|
|
@ -169,10 +169,9 @@ class SecureCookieSessionInterface(SessionInterface):
|
||||||
def save_session(self, app, session, response):
|
def save_session(self, app, session, response):
|
||||||
expires = self.get_expiration_time(app, session)
|
expires = self.get_expiration_time(app, session)
|
||||||
domain = self.get_cookie_domain(app)
|
domain = self.get_cookie_domain(app)
|
||||||
if not session:
|
if session.modified and not session:
|
||||||
if session.modified:
|
response.delete_cookie(app.session_cookie_name,
|
||||||
response.delete_cookie(app.session_cookie_name,
|
domain=domain)
|
||||||
domain=domain)
|
else:
|
||||||
return
|
session.save_cookie(response, app.session_cookie_name,
|
||||||
session.save_cookie(response, app.session_cookie_name,
|
expires=expires, httponly=True, domain=domain)
|
||||||
expires=expires, httponly=True, domain=domain)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue