feat: deleted unused code

This commit is contained in:
potatso 2023-07-11 21:58:15 +08:00
parent f81ac9988c
commit 6b1f5da26c
2 changed files with 0 additions and 14 deletions

View File

@ -126,8 +126,6 @@ end
function _M.do_log() function _M.do_log()
coraza.process_logging(ngx_ctx.transaction) coraza.process_logging(ngx_ctx.transaction)
local msg = coraza.get_matched_logmsg(ngx_ctx.transaction)
ngx_ctx.coraza_msg = msg
end end

View File

@ -90,8 +90,6 @@ extern int coraza_free_transaction(coraza_transaction_t t);
extern int coraza_free_intervention(coraza_intervention_t* it); extern int coraza_free_intervention(coraza_intervention_t* it);
extern int coraza_free_waf(coraza_waf_t t); extern int coraza_free_waf(coraza_waf_t t);
extern coraza_intervention_t* coraza_intervention(coraza_transaction_t tx); extern coraza_intervention_t* coraza_intervention(coraza_transaction_t tx);
extern char* coraza_get_matched_logmsg(coraza_transaction_t t);
extern int coraza_free_matched_logmsg(char* t);
]] ]]
local _M = { local _M = {
@ -340,16 +338,6 @@ function _M.process_response_body(transaction)
end end
end end
function _M.get_matched_logmsg(transaction)
local c_str = coraza.coraza_get_matched_logmsg(transaction)
nlog(debug_fmt("Transaction %s uccess to invoke coraza_get_matched_logmsg",
ngx_ctx.request_id))
local res = ffi.string(c_str)
nlog(debug_fmt("logmsg is %s", res))
coraza.coraza_free_matched_logmsg(c_str)
return res
end
function _M.process_logging(transaction) function _M.process_logging(transaction)
coraza.coraza_process_logging(transaction) coraza.coraza_process_logging(transaction)
nlog(debug_fmt("Transaction %s success to invoke coraza_process_logging", nlog(debug_fmt("Transaction %s success to invoke coraza_process_logging",