pull/221/head
midoks 3 years ago
parent 23f2b9efac
commit 07d173d2cf
  1. 9
      plugins/op_waf/index.py
  2. 1
      plugins/op_waf/waf/lua/init.lua
  3. 2
      plugins/webstats/index.py
  4. 2
      plugins/webstats/lua/webstats_common.lua

@ -424,6 +424,15 @@ def restart():
def reload(): def reload():
stop() stop()
path = getServerDir()
path_tpl = getPluginDir()
config = path + "/waf/lua/init.lua"
config_tpl = path_tpl + "/waf/lua/init.lua"
content = mw.readFile(config_tpl)
content = contentReplace(content)
mw.writeFile(config, content)
errlog = mw.getServerDir() + "/openresty/nginx/logs/error.log" errlog = mw.getServerDir() + "/openresty/nginx/logs/error.log"
mw.execShell('rm -rf ' + errlog) mw.execShell('rm -rf ' + errlog)

@ -295,6 +295,7 @@ local function is_open_waf_cc_increase()
return true return true
end end
-- C:D("waf config:"..json.encode(config))
if cpu_percent >= config['safe_verify']['cpu'] then if cpu_percent >= config['safe_verify']['cpu'] then
return true return true
end end

@ -132,7 +132,7 @@ def loadLuaSiteFile():
tmp = { tmp = {
"name": "unset", "name": "unset",
"domain": [], "domains": [],
} }
content.append(tmp) content.append(tmp)
listToLuaFile(lua_site, content) listToLuaFile(lua_site, content)

@ -149,7 +149,7 @@ function _M.get_sn(self, input_sn)
cache:set(input_sn, v['name'], 86400) cache:set(input_sn, v['name'], 86400)
return v["name"] return v["name"]
end end
-- self:D("get_sn:"..json.encode(v))
for _,dst_domain in ipairs(v['domains']) for _,dst_domain in ipairs(v['domains'])
do do
if input_sn == dst_domain then if input_sn == dst_domain then

Loading…
Cancel
Save