feat: Allow language preferences to be shared. (#28277)

We are planning on limiting session cookies for LMS, which
will mean that under the old cookie domain, MFEs and other
IDAs would not have access to the language preference of a user.

This moves language preference cookies to use a different setting,
which means that this cookie can be shared.
This commit is contained in:
Diana Huang
2021-07-26 13:36:55 -04:00
committed by GitHub
parent 789edbe555
commit 139e7ba48b

View File

@@ -27,7 +27,7 @@ def update_session_language(request):
response.set_cookie(
settings.LANGUAGE_COOKIE,
language,
domain=settings.SESSION_COOKIE_DOMAIN,
domain=settings.SHARED_COOKIE_DOMAIN,
max_age=COOKIE_DURATION,
secure=request.is_secure(),
)