...
|
...
|
@@ -36,6 +36,7 @@ local query_common_conf=function() |
|
|
local ok, code, headers, status, body = httpc:request{
|
|
|
url=nginx_common_conf_url,
|
|
|
method="GET",
|
|
|
timeout=120000
|
|
|
}
|
|
|
if ok then
|
|
|
local rate_limit_conf=cjson.decode(body)
|
...
|
...
|
@@ -64,6 +65,7 @@ local query_rate_limit_conf=function() |
|
|
local ok, code, headers, status, body = httpc:request{
|
|
|
url=rate_limit_conf_url,
|
|
|
method="GET",
|
|
|
timeout=120000
|
|
|
}
|
|
|
|
|
|
if ok then
|
...
|
...
|
@@ -102,6 +104,7 @@ local query_limit_ip_access_conf=function() |
|
|
local ok, code, headers, status, body = httpc:request{
|
|
|
url=limit_ip_access_url,
|
|
|
method="GET",
|
|
|
timeout=120000
|
|
|
}
|
|
|
|
|
|
if ok then
|
...
|
...
|
@@ -245,9 +248,9 @@ end |
|
|
-- subscribe mal ips task
|
|
|
ngx.timer.at(2,subscribe_mal_ips_loop)
|
|
|
|
|
|
timer_handler(true,5,query_rate_limit_conf,0)
|
|
|
timer_handler(true,7,query_limit_ip_access_conf,0)
|
|
|
timer_handler(true,9,query_common_conf,0)
|
|
|
timer_handler(true,20,query_rate_limit_conf,0)
|
|
|
timer_handler(true,25,query_limit_ip_access_conf,0)
|
|
|
timer_handler(true,30,query_common_conf,0)
|
|
|
|
|
|
|
|
|
-- every worker timing schedule configs from share cache
|
...
|
...
|
|