mirror of
https://github.com/potats0/lua-resty-coraza.git
synced 2025-11-19 02:30:38 +03:00
feat: 暴露waf变量
This commit is contained in:
@@ -109,6 +109,13 @@ function _M.new_waf()
|
||||
return waf
|
||||
end
|
||||
|
||||
function _M.free_waf(waf)
|
||||
-- extern int coraza_free_waf(coraza_waf_t t);
|
||||
local waf = coraza.coraza_free_waf(waf)
|
||||
nlog(debug_fmt("Success to free new waf"))
|
||||
return waf
|
||||
end
|
||||
|
||||
function _M.rules_add_file(waf, conf_file)
|
||||
-- extern int coraza_rules_add_file(coraza_waf_t w, char* file, char** er);
|
||||
local code = coraza.coraza_rules_add_file(waf, cast_to_c_char(conf_file), err_Ptr)
|
||||
|
||||
Reference in New Issue
Block a user