Commit 52b32476 by Feanil Patel

Add rate limiting to the lms course urls.

parent 37a82f8d
...@@ -10,6 +10,9 @@ upstream lms-backend { ...@@ -10,6 +10,9 @@ upstream lms-backend {
{% endfor %} {% endfor %}
} }
# Make Zone
limit_req_zone $cookie_{{ EDXAPP_SESSION_COOKIE_NAME }} zone=cookies:10m rate=10r/s;
server { server {
# LMS configuration file for nginx, templated by ansible # LMS configuration file for nginx, templated by ansible
...@@ -68,6 +71,13 @@ server { ...@@ -68,6 +71,13 @@ server {
try_files $uri @proxy_to_lms_app; try_files $uri @proxy_to_lms_app;
} }
location /course {
# Set Limit
limit_req zone=cookies burst=50;
{% include "basic-auth.j2" %}
try_files $uri @proxy_to_lms_app;
}
{% include "robots.j2" %} {% include "robots.j2" %}
{% include "static-files.j2" %} {% include "static-files.j2" %}
......
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