Commit 92f5c284 by Fred Smith

send mcka-api requests to apros

parent eb9dea8d
......@@ -9,3 +9,33 @@
expires 604800s;
}
{% endif %}
location /mcka-api/ {
try_files $uri @proxy_to_appros;
}
location @proxy_to_appros {
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://apros_app_server;
if ($host ~* beta\.(.*)) {
set $www_host www.$1;
rewrite ^(.*)$ https://$www_host$1 permanent;
}
# Forward to HTTPS if we're an HTTP request...
if ($http_x_forwarded_proto = "http") {
set $do_redirect "true";
}
# Run our actual redirect...
if ($do_redirect = "true") {
rewrite ^ https://$host$request_uri? permanent;
}
}
......@@ -11,6 +11,12 @@ upstream lms-backend {
}
upstream apros_app_server {
{% for host in nginx_apros_gunicorn_hosts %}
server {{host}}:{{mcka_apros_gunicorn_port}} fail_timeout=0;
{% endfor %}
}
{%- if EDXAPP_ENABLE_RATE_LIMITING -%}
# Make Zone
limit_req_zone $cookie_{{ EDXAPP_SESSION_COOKIE_NAME }} zone=cookies:10m rate={{ EDXAPP_COURSES_REQUEST_RATE }};
......
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