Created
February 26, 2025 19:00
-
-
Save felipekm/b197b672287763a8c773a5676fd83abf to your computer and use it in GitHub Desktop.
NGINX Allow/Deny Lists - Restrict API access to specific IPs or countries
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/ { | |
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