Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,8 @@

############################### DJANGO BUILT-INS ###############################

# django-session-cookie middleware
DCS_SESSION_COOKIE_SAMESITE = 'None'
DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL = True
# SameSite=None is required for cross-site OAuth/SSO flows over HTTPS in production.
SESSION_COOKIE_SAMESITE = 'None'

# LMS base
LMS_BASE = 'localhost:18000'
Expand Down
5 changes: 2 additions & 3 deletions lms/envs/devstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,8 @@ def should_show_debug_toolbar(request): # pylint: disable=missing-function-docs

#####################################################################

# django-session-cookie middleware
DCS_SESSION_COOKIE_SAMESITE = 'Lax'
DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL = True
# Browsers reject SameSite=None cookies on plain HTTP devstack hosts.
SESSION_COOKIE_SAMESITE = 'Lax'

########################## THEMING #######################
# If you want to enable theming in devstack, uncomment this section and add any relevant
Expand Down
4 changes: 0 additions & 4 deletions lms/envs/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ def get_env_setting(setting):

DATA_DIR = path(DATA_DIR) # noqa: F405

# TODO: This was for backwards compatibility back when installed django-cookie-samesite (not since 2022).
# The DCS_ version of the setting can be DEPR'd at this point.
SESSION_COOKIE_SAMESITE = DCS_SESSION_COOKIE_SAMESITE # noqa: F405

for feature, value in _YAML_TOKENS.get('FEATURES', {}).items():
FEATURES[feature] = value

Expand Down