From 184290418a1c2067087fc7444f6090e77d8bd1c0 Mon Sep 17 00:00:00 2001 From: Artur Date: Mon, 30 Dec 2024 14:25:01 +0100 Subject: [PATCH] limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=2r/s; to all --- nginx-config/https/https-api-arti24-eu.conf | 4 ++++ nginx-config/https/https-arti24-eu.conf | 4 ++++ nginx-config/https/https-themself-eu.conf | 5 +++++ nginx-config/https/https-zaklik-arti24-eu-https.conf | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/nginx-config/https/https-api-arti24-eu.conf b/nginx-config/https/https-api-arti24-eu.conf index 2d0aefd..059a270 100644 --- a/nginx-config/https/https-api-arti24-eu.conf +++ b/nginx-config/https/https-api-arti24-eu.conf @@ -1,3 +1,4 @@ +limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=2r/s; server { listen 443 ssl; @@ -14,6 +15,9 @@ server { location / { + # Ograniczenie liczby żądań + limit_req zone=ip_limit burst=20 nodelay; + proxy_pass http://angular-services:8800; proxy_set_header X-Real-IP $remote_addr; diff --git a/nginx-config/https/https-arti24-eu.conf b/nginx-config/https/https-arti24-eu.conf index 4fb0f4c..3aeb686 100644 --- a/nginx-config/https/https-arti24-eu.conf +++ b/nginx-config/https/https-arti24-eu.conf @@ -1,3 +1,4 @@ +limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=2r/s; server { listen 443 ssl; @@ -18,6 +19,9 @@ server { location / { + # Ograniczenie liczby żądań + limit_req zone=ip_limit burst=20 nodelay; + proxy_pass http://arti-angular-app:4200; proxy_set_header X-Real-IP $remote_addr; diff --git a/nginx-config/https/https-themself-eu.conf b/nginx-config/https/https-themself-eu.conf index 9ef5128..3e5531c 100644 --- a/nginx-config/https/https-themself-eu.conf +++ b/nginx-config/https/https-themself-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:3001; proxy_set_header X-Real-IP $remote_addr; diff --git a/nginx-config/https/https-zaklik-arti24-eu-https.conf b/nginx-config/https/https-zaklik-arti24-eu-https.conf index 9cf23d0..00178d9 100644 --- a/nginx-config/https/https-zaklik-arti24-eu-https.conf +++ b/nginx-config/https/https-zaklik-arti24-eu-https.conf @@ -1,3 +1,5 @@ +limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=2r/s; + server { listen 443 ssl; @@ -14,6 +16,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;