Commit aaaa47b9 by Max Rothman Committed by GitHub

Merge pull request #3524 from edx/max/fix-embargo-url

ECOM-6463: correct embargo URL
parents d48aa93e ecf637e2
......@@ -117,16 +117,17 @@ error_page {{ k }} {{ v }};
{% include "common-settings.j2" %}
{% if NGINX_EDXAPP_EMBARGO_CIDRS -%}
#only redirect to embargo when $embargo == true and $uri != /embargo
#only redirect to embargo when $embargo == true and $uri != $embargo_url
#this is a hack to do multiple conditionals
set embargo_url "/embargo/blocked-message/courseware/embargo/"
if ( $embargo ) {
set $do_embargo "A";
}
if ( $uri != "/embargo" ) {
if ( $uri != $embargo_url ) {
set $do_embargo "${do_embargo}B";
}
if ( $do_embargo = "AB" ) {
return 302 /embargo;
return 302 $embargo_url;
}
{% endif -%}
......@@ -174,7 +175,7 @@ error_page {{ k }} {{ v }};
}
{% if NGINX_EDXAPP_EMBARGO_CIDRS %}
location /embargo {
location $embargo_url {
try_files $uri @proxy_to_lms_app;
}
{% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment