replace ngx.re.match to ngx.re.find
parent
c56b191735
commit
884a6f387a
2
init.lua
2
init.lua
|
@ -1,6 +1,6 @@
|
||||||
require 'config'
|
require 'config'
|
||||||
local match = string.match
|
local match = string.match
|
||||||
local ngxmatch=ngx.re.match
|
local ngxmatch=ngx.re.find
|
||||||
local unescape=ngx.unescape_uri
|
local unescape=ngx.unescape_uri
|
||||||
local get_headers = ngx.req.get_headers
|
local get_headers = ngx.req.get_headers
|
||||||
local optionIsOn = function (options) return options == "on" and true or false end
|
local optionIsOn = function (options) return options == "on" and true or false end
|
||||||
|
|
2
waf.lua
2
waf.lua
|
@ -1,6 +1,6 @@
|
||||||
local content_length=tonumber(ngx.req.get_headers()['content-length'])
|
local content_length=tonumber(ngx.req.get_headers()['content-length'])
|
||||||
local method=ngx.req.get_method()
|
local method=ngx.req.get_method()
|
||||||
local ngxmatch=ngx.re.match
|
local ngxmatch=ngx.re.find
|
||||||
if whiteip() then
|
if whiteip() then
|
||||||
elseif blockip() then
|
elseif blockip() then
|
||||||
elseif denycc() then
|
elseif denycc() then
|
||||||
|
|
Loading…
Reference in New Issue