diff --git a/init.lua b/init.lua index d2000df..de225bd 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,6 @@ require 'config' local match = string.match -local ngxmatch=ngx.re.match +local ngxmatch=ngx.re.find local unescape=ngx.unescape_uri local get_headers = ngx.req.get_headers local optionIsOn = function (options) return options == "on" and true or false end diff --git a/waf.lua b/waf.lua index 257bb84..c65a4ea 100644 --- a/waf.lua +++ b/waf.lua @@ -1,6 +1,6 @@ local content_length=tonumber(ngx.req.get_headers()['content-length']) local method=ngx.req.get_method() -local ngxmatch=ngx.re.match +local ngxmatch=ngx.re.find if whiteip() then elseif blockip() then elseif denycc() then