Skip to content

Commit

Permalink
fix: LANGUAGE_COOKIE_NAME is not set by default
Browse files Browse the repository at this point in the history
Regression caused by https://github.com/edx/edx-platform/pull/28796

Details:

```
response.delete_cookie(
    settings.LANGUAGE_COOKIE_NAME,
    domain=settings.SHARED_COOKIE_DOMAIN
)
caused an Exception due to absence of LANGUAGE_COOKIE_NAME settings variable

> production.py

LANGUAGE_COOKIE_NAME = ENV_TOKENS.get('LANGUAGE_COOKIE', None) or ENV_TOKENS.get('LANGUAGE_COOKIE_NAME')
```
  • Loading branch information
cmltaWt0 committed Oct 7, 2021
1 parent 6c89173 commit ea0b4a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tutor/templates/apps/openedx/config/cms.env.json
Expand Up @@ -35,6 +35,7 @@
"EMAIL_USE_TLS": {{ "true" if SMTP_USE_TLS else "false" }},
"HTTPS": "{{ "on" if ENABLE_HTTPS else "off" }}",
"LANGUAGE_CODE": "{{ LANGUAGE_CODE }}",
"LANGUAGE_COOKIE_NAME": "{{ LANGUAGE_COOKIE_NAME }}",
"SESSION_COOKIE_DOMAIN": ".{{ LMS_HOST|common_domain(CMS_HOST) }}",
{{ patch("cms-env", separator=",\n", suffix=",")|indent(2) }}
"CACHES": {
Expand Down
1 change: 1 addition & 0 deletions tutor/templates/apps/openedx/config/lms.env.json
Expand Up @@ -45,6 +45,7 @@
"ACE_ROUTING_KEY": "edx.lms.core.default",
"HTTPS": "{{ "on" if ENABLE_HTTPS else "off" }}",
"LANGUAGE_CODE": "{{ LANGUAGE_CODE }}",
"LANGUAGE_COOKIE_NAME": "{{ LANGUAGE_COOKIE_NAME }}",
"SESSION_COOKIE_DOMAIN": ".{{ LMS_HOST|common_domain(CMS_HOST) }}",
{{ patch("lms-env", separator=",\n", suffix=",")|indent(2) }}
"CACHES": {
Expand Down
1 change: 1 addition & 0 deletions tutor/templates/config.yml
Expand Up @@ -48,6 +48,7 @@ JWT_COMMON_SECRET_KEY: "{{ OPENEDX_SECRET_KEY }}"
JWT_RSA_PRIVATE_KEY: "{{ 2048|rsa_private_key }}"
K8S_NAMESPACE: "openedx"
LANGUAGE_CODE: "en"
LANGUAGE_COOKIE_NAME: "openedx-language-preference"
MONGODB_HOST: "mongodb"
MONGODB_DATABASE: "openedx"
MONGODB_PORT: 27017
Expand Down

0 comments on commit ea0b4a6

Please sign in to comment.