Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
07addf5f
Unverified
Commit
07addf5f
authored
5 years ago
by
Mushtaq Ali
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #20853 from edx/mushtaq/fix-csrf-referer-not-trusted
Add CSRF_TRUSTED_ORIGINS settings
parents
257406b2
d9a67496
No related branches found
Branches containing commit
Tags
release-2018-06-01-10.30
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/envs/common.py
+1
-0
1 addition, 0 deletions
lms/envs/common.py
lms/envs/production.py
+3
-0
3 additions, 0 deletions
lms/envs/production.py
with
4 additions
and
0 deletions
lms/envs/common.py
+
1
−
0
View file @
07addf5f
...
...
@@ -2314,6 +2314,7 @@ CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52
# It is highly recommended that you override this in any environment accessed by
# end users
CSRF_COOKIE_SECURE
=
False
CSRF_TRUSTED_ORIGINS
=
[]
######################### Django Rest Framework ########################
...
...
This diff is collapsed.
Click to expand it.
lms/envs/production.py
+
3
−
0
View file @
07addf5f
...
...
@@ -428,6 +428,9 @@ NOTIFICATION_EMAIL_EDX_LOGO = ENV_TOKENS.get('NOTIFICATION_EMAIL_EDX_LOGO', NOTI
# by end users.
CSRF_COOKIE_SECURE
=
ENV_TOKENS
.
get
(
'
CSRF_COOKIE_SECURE
'
,
False
)
# Determines which origins are trusted for unsafe requests eg. POST requests.
CSRF_TRUSTED_ORIGINS
=
ENV_TOKENS
.
get
(
'
CSRF_TRUSTED_ORIGINS
'
,
[])
# Whitelist of domains to which the login/logout pages will redirect.
LOGIN_REDIRECT_WHITELIST
=
ENV_TOKENS
.
get
(
'
LOGIN_REDIRECT_WHITELIST
'
,
LOGIN_REDIRECT_WHITELIST
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment