Adds rate limiting to some views in nginx

This commit is contained in:
Mouse Reeve 2022-07-15 13:14:31 -07:00
parent 569e5400fe
commit 143eaf362d
2 changed files with 10 additions and 0 deletions

View file

@ -7,6 +7,15 @@ upstream web {
server {
listen 80;
location ~ ^/(login|password-reset|resend-link) {
limit_req zone=loginlimit;
proxy_pass http://web;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
location / {
proxy_pass http://web;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View file

@ -1 +1,2 @@
client_max_body_size 10m;
limit_req_zone $binary_remote_addr zone=loginlimit:10m rate=1r/s;