From 0f7a6c4a14b6f904748ef6b2d3564078e4824633 Mon Sep 17 00:00:00 2001 From: Tia i X570-ACE Date: Tue, 31 Dec 2024 14:37:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8A=A0=E8=A8=AD=E5=AE=9A=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hokbu-nginx/default.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hokbu-nginx/default.conf b/hokbu-nginx/default.conf index 4dcb429..f7b658f 100644 --- a/hokbu-nginx/default.conf +++ b/hokbu-nginx/default.conf @@ -2,6 +2,8 @@ upstream backend { server hapsing:5000; } +limit_req_zone $binary_remote_addr zone=ip:10m rate=10r/m; + server { listen 80; @@ -15,5 +17,7 @@ server { proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://backend; + + limit_req zone=ip burst=20 delay=10; } } From 3fee7b7d3678753d82110847b16f49afd3fe7df1 Mon Sep 17 00:00:00 2001 From: Tia i X570-ACE Date: Tue, 31 Dec 2024 14:40:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=A0=AD=E5=89=8D30=E7=AD=86=E6=9C=89?= =?UTF-8?q?=E5=95=8F=E5=B0=B1=E6=9C=89=EF=BC=8C=E5=85=B6=E4=BB=96=E7=85=A7?= =?UTF-8?q?1=E5=88=86=E9=90=985=E7=AD=86=E8=99=95=E7=90=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hokbu-nginx/default.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hokbu-nginx/default.conf b/hokbu-nginx/default.conf index f7b658f..7c2f6bd 100644 --- a/hokbu-nginx/default.conf +++ b/hokbu-nginx/default.conf @@ -2,7 +2,7 @@ upstream backend { server hapsing:5000; } -limit_req_zone $binary_remote_addr zone=ip:10m rate=10r/m; +limit_req_zone $binary_remote_addr zone=ip:10m rate=5r/m; server { listen 80; @@ -18,6 +18,6 @@ server { proxy_redirect off; proxy_pass http://backend; - limit_req zone=ip burst=20 delay=10; + limit_req zone=ip burst=30 nodelay; } } From cacb99e6d36b03fcb9b4651ca5a0d8344d7e0d2a Mon Sep 17 00:00:00 2001 From: Tia i X570-ACE Date: Tue, 31 Dec 2024 14:41:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=99=90=E5=88=B63=E7=AD=86=E8=BC=83?= =?UTF-8?q?=E5=A5=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hokbu-nginx/default.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hokbu-nginx/default.conf b/hokbu-nginx/default.conf index 7c2f6bd..eff555e 100644 --- a/hokbu-nginx/default.conf +++ b/hokbu-nginx/default.conf @@ -2,7 +2,7 @@ upstream backend { server hapsing:5000; } -limit_req_zone $binary_remote_addr zone=ip:10m rate=5r/m; +limit_req_zone $binary_remote_addr zone=ip:10m rate=3r/m; server { listen 80;