Skip to content

Instantly share code, notes, and snippets.

@felipekm
Created February 28, 2025 13:48
Show Gist options
  • Save felipekm/468e8675909d0283af5ab522f204600d to your computer and use it in GitHub Desktop.
Save felipekm/468e8675909d0283af5ab522f204600d to your computer and use it in GitHub Desktop.
NGINX Config for Rate Limiting & Connection Limits nginx Copy Edit
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