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
OpenEdx
configuration
Commits
ffc253f1
Commit
ffc253f1
authored
Nov 29, 2016
by
Max Rothman
Committed by
GitHub
Nov 29, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3498 from edx/max/sec-220
SEC-220: Block external logged in checking
parents
7bdd9d45
118000ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
4 deletions
+29
-4
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
+29
-4
No files found.
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
View file @
ffc253f1
...
@@ -116,6 +116,20 @@ error_page {{ k }} {{ v }};
...
@@ -116,6 +116,20 @@ error_page {{ k }} {{ v }};
{% include "python_lib.zip.j2" %}
{% include "python_lib.zip.j2" %}
{% include "common-settings.j2" %}
{% include "common-settings.j2" %}
{% if NGINX_EDXAPP_EMBARGO_CIDRS -%}
#only redirect to embargo when $embargo == true and $uri != /embargo
#this is a hack to do multiple conditionals
if ( $embargo ) {
set $do_embargo "A";
}
if ( $uri != "/embargo" ) {
set $do_embargo "${do_embargo}B";
}
if ( $do_embargo = "AB" ) {
return 302 /embargo;
}
{% endif -%}
location @proxy_to_lms_app {
location @proxy_to_lms_app {
{% if NGINX_SET_X_FORWARDED_HEADERS %}
{% if NGINX_SET_X_FORWARDED_HEADERS %}
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
...
@@ -140,11 +154,22 @@ error_page {{ k }} {{ v }};
...
@@ -140,11 +154,22 @@ error_page {{ k }} {{ v }};
{% if EDXAPP_LMS_ENABLE_BASIC_AUTH|bool %}
{% if EDXAPP_LMS_ENABLE_BASIC_AUTH|bool %}
{% include "basic-auth.j2" %}
{% include "basic-auth.j2" %}
{% endif %}
{% endif %}
{% if NGINX_EDXAPP_EMBARGO_CIDRS -%}
if ( $embargo ) {
try_files $uri @proxy_to_lms_app;
return 302 /embargo;
}
# /login?next=<any image> can be used by 3rd party sites in <img> tags to
# determine whether a user on their site is logged into edX.
# The most common image to use is favicon.ico.
location /login {
{% if EDXAPP_LMS_ENABLE_BASIC_AUTH|bool %}
{% include "basic-auth.j2" %}
{% endif %}
if ( $arg_next = "favicon.ico" ) {
return 403;
}
}
{% endif -%}
try_files $uri @proxy_to_lms_app;
try_files $uri @proxy_to_lms_app;
}
}
...
...
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