From 0b0f7047f429ffed19310d19f7e10e46d68e692e Mon Sep 17 00:00:00 2001 From: Artur Date: Mon, 30 Dec 2024 13:57:57 +0100 Subject: [PATCH] Zabezpieczenia przed atakami! limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=2r/s; --- nginx-config/https/https-bodypainter-eu.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nginx-config/https/https-bodypainter-eu.conf b/nginx-config/https/https-bodypainter-eu.conf index d551930..a1a4aa1 100644 --- a/nginx-config/https/https-bodypainter-eu.conf +++ b/nginx-config/https/https-bodypainter-eu.conf @@ -1,3 +1,5 @@ +limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=2r/s; + server { listen 443 ssl; @@ -31,6 +33,9 @@ server { location / { + # Ograniczenie liczby żądań + limit_req zone=ip_limit burst=20 nodelay; + proxy_pass http://zaklik_by_node_js:3000; proxy_set_header X-Real-IP $remote_addr;