mirror of
https://github.com/potats0/lua-resty-coraza.git
synced 2025-06-28 17:41:00 +03:00
fixed: 修复空指针
This commit is contained in:
parent
573ba91483
commit
df1b4b1085
@ -52,9 +52,11 @@ local _M = {
|
|||||||
|
|
||||||
function _M.check_schema(conf)
|
function _M.check_schema(conf)
|
||||||
core.log.info("check coraza schema")
|
core.log.info("check coraza schema")
|
||||||
|
if conf.Rules ~= nil then
|
||||||
for i, rule in ipairs(conf.Rules) do
|
for i, rule in ipairs(conf.Rules) do
|
||||||
coraza.rules_add(rule)
|
coraza.rules_add(rule)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return core.schema.check(schema, conf)
|
return core.schema.check(schema, conf)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user