Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
dc023faf
Commit
dc023faf
authored
Apr 13, 2017
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the ability to specify additional whitelisted domains for CORS for
the credentials service. LEARNER-516
parent
59e98eeb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
playbooks/roles/credentials/defaults/main.yml
+5
-3
playbooks/roles/credentials/templates/edx/app/nginx/sites-available/credentials.j2
+1
-1
No files found.
playbooks/roles/credentials/defaults/main.yml
View file @
dc023faf
...
@@ -109,9 +109,11 @@ CREDENTIALS_FILE_STORAGE_BACKEND:
...
@@ -109,9 +109,11 @@ CREDENTIALS_FILE_STORAGE_BACKEND:
DEFAULT_FILE_STORAGE
:
'
django.core.files.storage.FileSystemStorage'
DEFAULT_FILE_STORAGE
:
'
django.core.files.storage.FileSystemStorage'
# Note: the protocol for CORS whitelist values is necessary for matching the correct origin by nginx
# Note: the protocol for CORS whitelist values is necessary for matching the correct origin by nginx
CREDENTIALS_CORS_WHITELIST
:
CREDENTIALS_CORS_WHITELIST_DEFAULT
:
-
"
http://{{
CREDENTIALS_DOMAIN
}}"
-
"
{{
CREDENTIALS_DOMAIN
}}"
-
"
https://{{
CREDENTIALS_DOMAIN
}}"
CREDENTIALS_CORS_WHITELIST_EXTRA
:
[]
CREDENTIALS_CORS_WHITELIST
:
"
{{
CREDENTIALS_CORS_WHITELIST_DEFAULT
+
CREDENTIALS_CORS_WHITELIST_EXTRA
}}"
CREDENTIALS_VERSION
:
"
master"
CREDENTIALS_VERSION
:
"
master"
CREDENTIALS_REPOS
:
CREDENTIALS_REPOS
:
...
...
playbooks/roles/credentials/templates/edx/app/nginx/sites-available/credentials.j2
View file @
dc023faf
...
@@ -17,7 +17,7 @@ upstream credentials_app_server {
...
@@ -17,7 +17,7 @@ upstream credentials_app_server {
map $http_origin $cors_header {
map $http_origin $cors_header {
default "";
default "";
'~*^({{ CREDENTIALS_CORS_WHITELIST|join('|')|replace('.', '\.') }})$' "$http_origin";
'~*^
https?://
({{ CREDENTIALS_CORS_WHITELIST|join('|')|replace('.', '\.') }})$' "$http_origin";
}
}
server {
server {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment