Chop of ports for session cookies. This fixes #253
This commit is contained in:
parent
4e47ea9105
commit
ccd5ced70e
2 changed files with 16 additions and 1 deletions
|
|
@ -602,7 +602,8 @@ class Flask(_PackageBoundObject):
|
|||
if session.permanent:
|
||||
expires = datetime.utcnow() + self.permanent_session_lifetime
|
||||
if self.config['SERVER_NAME'] is not None:
|
||||
domain = '.' + self.config['SERVER_NAME']
|
||||
# chop of the port which is usually not supported by browsers
|
||||
domain = '.' + self.config['SERVER_NAME'].rsplit(':', 1)[0]
|
||||
session.save_cookie(response, self.session_cookie_name,
|
||||
expires=expires, httponly=True, domain=domain)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue