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,8 +52,10 @@ local _M = {
|
||||
|
||||
function _M.check_schema(conf)
|
||||
core.log.info("check coraza schema")
|
||||
for i, rule in ipairs(conf.Rules) do
|
||||
coraza.rules_add(rule)
|
||||
if conf.Rules ~= nil then
|
||||
for i, rule in ipairs(conf.Rules) do
|
||||
coraza.rules_add(rule)
|
||||
end
|
||||
end
|
||||
return core.schema.check(schema, conf)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user