Skip to content

Instantly share code, notes, and snippets.

@felipekm
Created February 26, 2025 19:00
Show Gist options
  • Save felipekm/b197b672287763a8c773a5676fd83abf to your computer and use it in GitHub Desktop.
Save felipekm/b197b672287763a8c773a5676fd83abf to your computer and use it in GitHub Desktop.
NGINX Allow/Deny Lists - Restrict API access to specific IPs or countries
server {
location /api/ {
deny 192.168.1.100;
allow 10.0.0.0/8;
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment