fix PCRE_MULTILINE
parent
2b32a34dfc
commit
33940892a5
12
init.lua
12
init.lua
|
@ -80,7 +80,7 @@ function whiteurl()
|
||||||
if WhiteCheck then
|
if WhiteCheck then
|
||||||
if wturlrules ~=nil then
|
if wturlrules ~=nil then
|
||||||
for _,rule in pairs(wturlrules) do
|
for _,rule in pairs(wturlrules) do
|
||||||
if ngxmatch(ngx.var.request_uri,rule,"isjo") then
|
if ngxmatch(ngx.var.request_uri,rule,"imjo") then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -98,7 +98,7 @@ function args()
|
||||||
else
|
else
|
||||||
data=val
|
data=val
|
||||||
end
|
end
|
||||||
if data and type(data) ~= "boolean" and rule ~="" and ngxmatch(unescape(data),rule,"isjo") then
|
if data and type(data) ~= "boolean" and rule ~="" and ngxmatch(unescape(data),rule,"imjo") then
|
||||||
log('GET',ngx.var.request_uri,"-",rule)
|
log('GET',ngx.var.request_uri,"-",rule)
|
||||||
say_html()
|
say_html()
|
||||||
return true
|
return true
|
||||||
|
@ -112,7 +112,7 @@ end
|
||||||
function url()
|
function url()
|
||||||
if UrlDeny then
|
if UrlDeny then
|
||||||
for _,rule in pairs(urlrules) do
|
for _,rule in pairs(urlrules) do
|
||||||
if rule ~="" and ngxmatch(ngx.var.request_uri,rule,"isjo") then
|
if rule ~="" and ngxmatch(ngx.var.request_uri,rule,"imjo") then
|
||||||
log('GET',ngx.var.request_uri,"-",rule)
|
log('GET',ngx.var.request_uri,"-",rule)
|
||||||
say_html()
|
say_html()
|
||||||
return true
|
return true
|
||||||
|
@ -126,7 +126,7 @@ function ua()
|
||||||
local ua = ngx.var.http_user_agent
|
local ua = ngx.var.http_user_agent
|
||||||
if ua ~= nil then
|
if ua ~= nil then
|
||||||
for _,rule in pairs(uarules) do
|
for _,rule in pairs(uarules) do
|
||||||
if rule ~="" and ngxmatch(ua,rule,"isjo") then
|
if rule ~="" and ngxmatch(ua,rule,"imjo") then
|
||||||
log('UA',ngx.var.request_uri,"-",rule)
|
log('UA',ngx.var.request_uri,"-",rule)
|
||||||
say_html()
|
say_html()
|
||||||
return true
|
return true
|
||||||
|
@ -137,7 +137,7 @@ function ua()
|
||||||
end
|
end
|
||||||
function body(data)
|
function body(data)
|
||||||
for _,rule in pairs(postrules) do
|
for _,rule in pairs(postrules) do
|
||||||
if rule ~="" and ngxmatch(unescape(data),rule,"isjo") then
|
if rule ~="" and ngxmatch(unescape(data),rule,"imjo") then
|
||||||
log('POST',ngx.var.request_uri,data,rule)
|
log('POST',ngx.var.request_uri,data,rule)
|
||||||
say_html()
|
say_html()
|
||||||
return true
|
return true
|
||||||
|
@ -149,7 +149,7 @@ function cookie()
|
||||||
local ck = ngx.var.http_cookie
|
local ck = ngx.var.http_cookie
|
||||||
if CookieCheck and ck then
|
if CookieCheck and ck then
|
||||||
for _,rule in pairs(ckrules) do
|
for _,rule in pairs(ckrules) do
|
||||||
if rule ~="" and ngxmatch(ck,rule,"isjo") then
|
if rule ~="" and ngxmatch(ck,rule,"imjo") then
|
||||||
log('Cookie',ngx.var.request_uri,"-",rule)
|
log('Cookie',ngx.var.request_uri,"-",rule)
|
||||||
say_html()
|
say_html()
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue