I have a Lua Script which Logins to the Redis and Process some Query to enable IP Based Blocking
Below is the Redis Config I am using in my Lua script and to run this script at every hit to the webserver I use the access_by_lua directive in my Nginx conference
--- Redis Configuration
local redis_host = "100.2.4.4"
local redis_port = 6379
local redis_timeout = 30
local cache_ttl = 3600
I would like to use an environment Variable in the reds_host and the port rather than static value Any Help is appreciated
Note:
I have tried it as below, but no luck
--- Redis Configuration
local redis_host = os.getenv("redis_auth_host")
local redis_port = os.getenv("redis_auth_port")
local redis_timeout = 30
local cache_ttl = 3600