This file contains 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
-- a quick LUA access script for nginx to check IP addresses match an | |
-- `ip_whitelist` set in Redis, and if no match is found send a HTTP | |
-- 403 response or just a custom json instead. | |
-- | |
-- allows for a common whitelist to be shared between a bunch of nginx | |
-- web servers using a remote redis instance. lookups are cached for a | |
-- configurable period of time. | |
-- | |
-- white an ip: | |
-- redis-cli SADD ip_whitelist 10.1.1.1 |