fix
This commit is contained in:
parent
2cd7200544
commit
f56383722b
1 changed files with 1 additions and 1 deletions
|
@ -268,7 +268,7 @@ function live_query(ip)
|
||||||
end
|
end
|
||||||
if body == "null" then -- no result from API, no decision for this IP
|
if body == "null" then -- no result from API, no decision for this IP
|
||||||
-- set ip in cache and DON'T block it
|
-- set ip in cache and DON'T block it
|
||||||
local key = item_to_string(decision.value, "ip")
|
local key = item_to_string(ip, "ip")
|
||||||
local succ, err, forcible = runtime.cache:set(key, true, runtime.conf["CACHE_EXPIRATION"], 1)
|
local succ, err, forcible = runtime.cache:set(key, true, runtime.conf["CACHE_EXPIRATION"], 1)
|
||||||
if not succ then
|
if not succ then
|
||||||
ngx.log(ngx.ERR, "failed to add ip '" .. ip .. "' in cache: "..err)
|
ngx.log(ngx.ERR, "failed to add ip '" .. ip .. "' in cache: "..err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue