Commit 0f61a159 authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: server_url is not in environ

parent 14924440
...@@ -16,9 +16,9 @@ portal.portal_sessions[ ...@@ -16,9 +16,9 @@ portal.portal_sessions[
) )
]['ac_renew'] = ac_renew ]['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'): if same_site not in ('None', 'Lax', 'Strict'):
# Do not use the SameSite attribute # Do not use the SameSite attribute
same_site = None same_site = None
...@@ -27,7 +27,7 @@ resp.setCookie( ...@@ -27,7 +27,7 @@ resp.setCookie(
name=cookie_name, name=cookie_name,
value=cookie_value, value=cookie_value,
path='/', path='/',
secure=REQUEST_DICT.get('SERVER_URL', '').startswith('https:'), secure=REQUEST.get('SERVER_URL', '').startswith('https:'),
http_only=True, http_only=True,
same_site=same_site, same_site=same_site,
**kw **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