lua - fix wrong variable name in access

This commit is contained in:
bunkerity 2023-04-03 16:22:42 +02:00
parent 220374db4b
commit e80965ca9a
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ if use_redis == "yes" then
if not ttl then
logger.log(ngx.ERR, "ACCESS", "TTL failed : " .. err)
else
local ok, err = datastore:set("bans_ip_" .. ip, ban, ttl)
local ok, err = datastore:set("bans_ip_" .. ngx.var.remote_addr, ban, ttl)
if not ok then
logger.log(ngx.ERR, "ACCESS", "can't save ban to the datastore : " .. err)
return