src.nth.io/

summaryrefslogtreecommitdiff
path: root/dendrite/server/templates/nginx.conf.j2
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-03-23 22:22:36 -0500
committerLuke Hoersten <[email protected]>2026-03-23 22:22:36 -0500
commit1859f62813f0c586ea49f912944fb25efd60520f (patch)
tree5e92465f6e24cda9f4c38c2c2c00d0c0ccd7c525 /dendrite/server/templates/nginx.conf.j2
parentb7fbbf6810d4d53ca7a0afca31134181f7025a67 (diff)
Fixed log rotation and log2ram sizing.
Diffstat (limited to 'dendrite/server/templates/nginx.conf.j2')
-rw-r--r--dendrite/server/templates/nginx.conf.j27
1 files changed, 7 insertions, 0 deletions
diff --git a/dendrite/server/templates/nginx.conf.j2 b/dendrite/server/templates/nginx.conf.j2
index 8e2d34f..aa7125c 100644
--- a/dendrite/server/templates/nginx.conf.j2
+++ b/dendrite/server/templates/nginx.conf.j2
@@ -1,3 +1,5 @@
+limit_req_zone $binary_remote_addr zone=dendrite_reg:10m rate=2r/m;
+
server {
listen 80;
server_name {{nginx_server_name}};
@@ -36,6 +38,11 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 600;
+ location ~* ^/_matrix/client/[^/]+/register {
+ limit_req zone=dendrite_reg burst=3 nodelay;
+ proxy_pass http://127.0.0.1:{{nginx_proxy_port}};
+ }
+
location /_matrix {
proxy_pass http://127.0.0.1:{{nginx_proxy_port}};
}