Created
February 28, 2025 13:48
-
-
Save felipekm/468e8675909d0283af5ab522f204600d to your computer and use it in GitHub Desktop.
NGINX Config for Rate Limiting & Connection Limits nginx Copy Edit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
location /api/ { | |
limit_req zone=req_limit burst=20 nodelay; # Limit to 10 req/sec per IP | |
limit_conn conn_limit 5; # Max 5 concurrent connections per IP | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment