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
d94a533b
Commit
d94a533b
authored
Mar 04, 2016
by
Qubad786
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify rate limiting
parent
5b1dbcac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
playbooks/roles/edxapp/defaults/main.yml
+2
-2
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
+2
-2
No files found.
playbooks/roles/edxapp/defaults/main.yml
View file @
d94a533b
...
...
@@ -225,9 +225,9 @@ EDXAPP_CMS_NGINX_PORT: 18010
EDXAPP_CMS_SSL_NGINX_PORT
:
48010
# NGINX Rate limiting related vars
EDXAPP_ENABLE_RATE_LIMITING
:
fals
e
EDXAPP_ENABLE_RATE_LIMITING
:
tru
e
EDXAPP_COURSE_REQUEST_RATE
:
'
5r/s'
EDXAPP_COURSE_REQUEST_BURST_RATE
:
1
0
EDXAPP_COURSE_REQUEST_BURST_RATE
:
0
EDXAPP_LANG
:
'
en_US.UTF-8'
EDXAPP_LANGUAGE_CODE
:
'
en'
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
View file @
d94a533b
...
...
@@ -13,7 +13,7 @@ upstream lms-backend {
{%- if EDXAPP_ENABLE_RATE_LIMITING -%}
# Make Zone
limit_req_zone $cookie_{{ EDXAPP_SESSION_COOKIE_NAME }} zone=cookies:10m rate=
{{ EDXAPP_COURSES_REQUEST_RATE }}
;
limit_req_zone $cookie_{{ EDXAPP_SESSION_COOKIE_NAME }} zone=cookies:10m rate=
12r/m
;
{%- endif %}
...
...
@@ -198,7 +198,7 @@ error_page {{ k }} {{ v }};
location /courses {
{%- if EDXAPP_ENABLE_RATE_LIMITING -%}
# Set Limit
limit_req zone=cookies
burst={{ EDXAPP_COURSE_REQUEST_BURST_RATE }}
;
limit_req zone=cookies;
error_page 503 = /server/rate-limit.html;
{%- endif -%}
...
...
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