From 4d97416d4469fa26cdb1ad6416080af4dc8c080f Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Fri, 16 Aug 2024 17:50:13 +0800 Subject: [PATCH] Remove request rate restriction and remove proxy protocol Signed-off-by: Egor Savkin --- m-labs-intl/m-labs-intl.com | 5 ++--- m-labs-intl/nginx.conf | 6 ------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/m-labs-intl/m-labs-intl.com b/m-labs-intl/m-labs-intl.com index 1beb125..7e76e8c 100644 --- a/m-labs-intl/m-labs-intl.com +++ b/m-labs-intl/m-labs-intl.com @@ -36,8 +36,7 @@ server { server { server_name hooks.m-labs-intl.com; - limit_conn addr 1; - limit_req zone=rfq; + limit_conn addr 5; location /rfq { proxy_pass http://rfq_server/rfq; @@ -63,7 +62,7 @@ server { } server { - limit_conn addr 1; + limit_conn addr 5; if ($host = m-labs-intl.com) { return 301 https://$host$request_uri; } # managed by Certbot diff --git a/m-labs-intl/nginx.conf b/m-labs-intl/nginx.conf index a015061..49ded56 100644 --- a/m-labs-intl/nginx.conf +++ b/m-labs-intl/nginx.conf @@ -35,7 +35,6 @@ http { # Rate limiting limit_conn_zone $binary_remote_addr zone=addr:10m; - limit_req_zone $binary_remote_addr zone=rfq:10m rate=5r/m; ## # Logging Settings @@ -66,7 +65,6 @@ http { stream { - limit_conn_zone $binary_remote_addr zone=mail:10m; # Upstream mail servers upstream smtp_backend { server mail.m-labs.hk:25; @@ -80,15 +78,11 @@ stream { server { listen 25; proxy_pass smtp_backend; - proxy_protocol on; - limit_conn mail 5; } # Submission (Authenticated SMTP) server { listen 587; proxy_pass submission_backend; - proxy_protocol on; - limit_conn mail 5; } } \ No newline at end of file