diff --git a/conf.d/auth.shore.co.il.conf b/conf.d/auth.shore.co.il.conf index d40375abc60f65661070f60681f29c3057588cea..014ac07c4c069cb02a17d052354525b9d4c33b68 100644 --- a/conf.d/auth.shore.co.il.conf +++ b/conf.d/auth.shore.co.il.conf @@ -1,5 +1,8 @@ map $host $auth { default auth; } +limit_req_zone $binary_remote_addr zone=ldap_auth:2m rate=2r/s; +limit_req_status 429; + server { listen 80; listen [::]:80; @@ -20,10 +23,12 @@ server { include snippets/security-txt.conf; include snippets/ssl.conf; + location / { proxy_pass http://$auth:8080$request_uri; proxy_http_version 1.1; include snippets/proxy-headers.conf; include snippets/allow-shore-ips.conf; + limit_req zone=ldap_auth burst=10 delay=2; } }