mirror of
https://github.com/potats0/lua-resty-coraza.git
synced 2026-01-02 22:54:51 +03:00
feat: deleted unused code
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user