projects
/
discourse_docker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f85e81
)
Use 429 error code for nginx ratelimiting
author
riking
<rikingcoding@gmail.com>
Fri, 7 Nov 2014 17:26:20 +0000
(09:26 -0800)
committer
riking
<rikingcoding@gmail.com>
Fri, 7 Nov 2014 17:26:20 +0000
(09:26 -0800)
templates/web.ratelimited.template.yml
patch
|
blob
|
blame
|
history
diff --git
a/templates/web.ratelimited.template.yml
b/templates/web.ratelimited.template.yml
index 432d3cb23f635f550cdffc6798be66994d7f0e3d..8074da5c44160c19a79f08e5d5f67564b7aa655a 100644
(file)
--- a/
templates/web.ratelimited.template.yml
+++ b/
templates/web.ratelimited.template.yml
@@
-11,6
+11,7
@@
run:
to: |
limit_req_zone $binary_remote_addr zone=flood:10m rate=$reqs_per_secondr/s;
limit_req_zone $binary_remote_addr zone=bot:10m rate=$reqs_per_minuter/m;
+ limit_req_status 429;
server {
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"