Remove request rate restriction and remove proxy protocol

Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
Egor Savkin 2024-08-16 17:50:13 +08:00
parent d337612ccc
commit a6a77f56e1
2 changed files with 2 additions and 9 deletions

View File

@ -36,8 +36,7 @@ server {
server { server {
server_name hooks.m-labs-intl.com; server_name hooks.m-labs-intl.com;
limit_conn addr 1; limit_conn addr 5;
limit_req zone=rfq;
location /rfq { location /rfq {
proxy_pass http://rfq_server/rfq; proxy_pass http://rfq_server/rfq;
@ -63,7 +62,7 @@ server {
} }
server { server {
limit_conn addr 1; limit_conn addr 5;
if ($host = m-labs-intl.com) { if ($host = m-labs-intl.com) {
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
} # managed by Certbot } # managed by Certbot

View File

@ -35,7 +35,6 @@ http {
# Rate limiting # Rate limiting
limit_conn_zone $binary_remote_addr zone=addr:10m; limit_conn_zone $binary_remote_addr zone=addr:10m;
limit_req_zone $binary_remote_addr zone=rfq:10m rate=5r/m;
## ##
# Logging Settings # Logging Settings
@ -66,7 +65,6 @@ http {
stream { stream {
limit_conn_zone $binary_remote_addr zone=mail:10m;
# Upstream mail servers # Upstream mail servers
upstream smtp_backend { upstream smtp_backend {
server mail.m-labs.hk:25; server mail.m-labs.hk:25;
@ -80,15 +78,11 @@ stream {
server { server {
listen 25; listen 25;
proxy_pass smtp_backend; proxy_pass smtp_backend;
proxy_protocol on;
limit_conn mail 5;
} }
# Submission (Authenticated SMTP) # Submission (Authenticated SMTP)
server { server {
listen 587; listen 587;
proxy_pass submission_backend; proxy_pass submission_backend;
proxy_protocol on;
limit_conn mail 5;
} }
} }