Commit 582b0bc5 authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: server_url is not in environ

parent c86aa252
......@@ -16,9 +16,9 @@ portal.portal_sessions[
)
]['ac_renew'] = ac_renew
REQUEST_DICT = portal.REQUEST.environ
REQUEST = portal.REQUEST
same_site = portal.ERP5Site_getAuthCookieSameSite(host=REQUEST_DICT.get('HTTP_HOST'))
same_site = portal.ERP5Site_getAuthCookieSameSite(host=REQUEST.environ.get('HTTP_HOST'))
if same_site not in ('None', 'Lax', 'Strict'):
# Do not use the SameSite attribute
same_site = None
......@@ -27,7 +27,7 @@ resp.setCookie(
name=cookie_name,
value=cookie_value,
path='/',
secure=REQUEST_DICT.get('SERVER_URL', '').startswith('https:'),
secure=REQUEST.get('SERVER_URL', '').startswith('https:'),
http_only=True,
same_site=same_site,
**kw
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment