Enable rate limiting in nginx

Fixes #20
This commit is contained in:
Matt Isenhower 2019-05-25 09:18:55 -07:00
parent 3f25df1a21
commit f51e3df63b

View File

@ -1,3 +1,6 @@
# Rate limiting zone (Note: 10m is the size of the address pool, not time)
limit_req_zone $binary_remote_addr zone=main:10m rate=10r/s;
server {
listen 80 default_server;
@ -15,6 +18,9 @@ server {
access_log /var/log/nginx/access.log;
access_log /logs/access.log;
# Rate limiting: allow bursts with no delay
limit_req zone=main burst=500 nodelay;
location / {
try_files $uri $uri/ /index.html;
}