Add SameSite flag to work with Firefox Nightly

This commit is contained in:
Joe Ren 2020-05-01 21:24:38 +10:00 committed by Earth Engine
parent f3a839f422
commit f70a526eb1
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class UiRequestPlugin(object):
url = self.env.get("HTTP_REFERER", "")
if not url or re.sub(r"\?.*", "", url).endswith("/Login"):
url = "/" + config.homepage
cookie_header = ('Set-Cookie', "session_id=%s;path=/;max-age=2592000;" % session_id) # Max age = 30 days
cookie_header = ('Set-Cookie', "session_id=%s;path=/;SameSite=None;secure;max-age=2592000;" % session_id) # Max age = 30 days
self.start_response('301 Redirect', [('Location', url), cookie_header])
yield "Redirecting..."