From: riking Date: Fri, 7 Nov 2014 17:26:20 +0000 (-0800) Subject: Use 429 error code for nginx ratelimiting X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=78f9aa86e94ac4b2713d77cda46ce20601b4791f;p=discourse_docker.git Use 429 error code for nginx ratelimiting --- diff --git a/templates/web.ratelimited.template.yml b/templates/web.ratelimited.template.yml index 432d3cb..8074da5 100644 --- 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"