From 48ed4156b578ca5795e8f0e38c20c7e121adcdd6 Mon Sep 17 00:00:00 2001 From: midoks Date: Thu, 13 Oct 2022 17:06:42 +0800 Subject: [PATCH] Update common.lua --- plugins/op_waf/waf/lua/common.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/op_waf/waf/lua/common.lua b/plugins/op_waf/waf/lua/common.lua index 6f395964b..98f7de3ad 100644 --- a/plugins/op_waf/waf/lua/common.lua +++ b/plugins/op_waf/waf/lua/common.lua @@ -302,13 +302,13 @@ function _M.is_ipaddr(self, client_ip) end -function _M.read_file_body_decode(self, filename) +function _M.read_file_body_decode(self, name) local key = "read_file_body_decode"..name local fbody = ngx.shared.limit:get(key, fbody) if fbody then return fbody end - local data = json.decode(self:read_file_body(filename)) + local data = json.decode(self:read_file_body(name)) ngx.shared.limit:set(key,data) return data end