diff --git a/plugins/op_waf/waf/lua/common.lua b/plugins/op_waf/waf/lua/common.lua index 0e0da3d5c..1b2ba9f88 100644 --- a/plugins/op_waf/waf/lua/common.lua +++ b/plugins/op_waf/waf/lua/common.lua @@ -34,7 +34,7 @@ end function _M.getInstance(self) if rawget(self, "instance") == nil then - rawset(self, "instance", self.new()) + rawset(self, "instance", self:new()) end assert(self.instance ~= nil) return self.instance diff --git a/plugins/op_waf/waf/lua/init.lua b/plugins/op_waf/waf/lua/init.lua index e622c476d..b05be575e 100644 --- a/plugins/op_waf/waf/lua/init.lua +++ b/plugins/op_waf/waf/lua/init.lua @@ -1,8 +1,10 @@ + local json = require "cjson" local ngx_match = ngx.re.find local __C = require "common" +-- print(json.encode(__C)) local C = __C:getInstance() local config = require "waf_config"