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
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
0f125c7a
Commit
0f125c7a
authored
6 years ago
by
Douglas Hall
Browse files
Options
Downloads
Patches
Plain Diff
Allow custom USE-JWT-COOKIE header on cross origin requests.
parent
6aed7282
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lms/envs/aws.py
+4
-0
4 additions, 0 deletions
lms/envs/aws.py
lms/envs/common.py
+4
-0
4 additions, 0 deletions
lms/envs/common.py
lms/envs/production.py
+4
-0
4 additions, 0 deletions
lms/envs/production.py
with
12 additions
and
0 deletions
lms/envs/aws.py
+
4
−
0
View file @
0f125c7a
...
...
@@ -23,6 +23,7 @@ import os
import
logging
import
dateutil
from
corsheaders.defaults
import
default_headers
as
corsheaders_default_headers
from
path
import
Path
as
path
from
xmodule.modulestore.modulestore_settings
import
convert_module_store_setting_if_needed
...
...
@@ -428,6 +429,9 @@ if FEATURES.get('ENABLE_CORS_HEADERS') or FEATURES.get('ENABLE_CROSS_DOMAIN_CSRF
CORS_ORIGIN_WHITELIST
=
ENV_TOKENS
.
get
(
'
CORS_ORIGIN_WHITELIST
'
,
())
CORS_ORIGIN_ALLOW_ALL
=
ENV_TOKENS
.
get
(
'
CORS_ORIGIN_ALLOW_ALL
'
,
False
)
CORS_ALLOW_INSECURE
=
ENV_TOKENS
.
get
(
'
CORS_ALLOW_INSECURE
'
,
False
)
CORS_ALLOW_HEADERS
=
corsheaders_default_headers
+
(
'
use-jwt-cookie
'
,
)
# If setting a cross-domain cookie, it's really important to choose
# a name for the cookie that is DIFFERENT than the cookies used
...
...
This diff is collapsed.
Click to expand it.
lms/envs/common.py
+
4
−
0
View file @
0f125c7a
...
...
@@ -32,6 +32,7 @@ import imp
import
sys
import
os
from
corsheaders.defaults
import
default_headers
as
corsheaders_default_headers
from
path
import
Path
as
path
from
django.utils.translation
import
ugettext_lazy
as
_
...
...
@@ -2509,6 +2510,9 @@ if FEATURES.get('ENABLE_CORS_HEADERS'):
CORS_ALLOW_CREDENTIALS
=
True
CORS_ORIGIN_WHITELIST
=
()
CORS_ORIGIN_ALLOW_ALL
=
False
CORS_ALLOW_HEADERS
=
corsheaders_default_headers
+
(
'
use-jwt-cookie
'
,
)
# Default cache expiration for the cross-domain proxy HTML page.
# This is a static page that can be iframed into an external page
...
...
This diff is collapsed.
Click to expand it.
lms/envs/production.py
+
4
−
0
View file @
0f125c7a
...
...
@@ -23,6 +23,7 @@ import json
import
os
import
dateutil
from
corsheaders.defaults
import
default_headers
as
corsheaders_default_headers
from
path
import
Path
as
path
from
xmodule.modulestore.modulestore_settings
import
convert_module_store_setting_if_needed
...
...
@@ -424,6 +425,9 @@ if FEATURES.get('ENABLE_CORS_HEADERS') or FEATURES.get('ENABLE_CROSS_DOMAIN_CSRF
CORS_ORIGIN_WHITELIST
=
ENV_TOKENS
.
get
(
'
CORS_ORIGIN_WHITELIST
'
,
())
CORS_ORIGIN_ALLOW_ALL
=
ENV_TOKENS
.
get
(
'
CORS_ORIGIN_ALLOW_ALL
'
,
False
)
CORS_ALLOW_INSECURE
=
ENV_TOKENS
.
get
(
'
CORS_ALLOW_INSECURE
'
,
False
)
CORS_ALLOW_HEADERS
=
corsheaders_default_headers
+
(
'
use-jwt-cookie
'
,
)
# If setting a cross-domain cookie, it's really important to choose
# a name for the cookie that is DIFFERENT than the cookies used
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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