reft: 删除无用代码

This commit is contained in:
potatso 2023-07-04 13:00:25 +08:00
parent 884eda920e
commit 0346a79022

View File

@ -124,19 +124,13 @@ function _M.do_header_filter()
-- copy from https://github.com/SpiderLabs/ModSecurity-nginx/blob/d59e4ad121df702751940fd66bcc0b3ecb51a079/src/ngx_http_modsecurity_header_filter.c#L527 -- copy from https://github.com/SpiderLabs/ModSecurity-nginx/blob/d59e4ad121df702751940fd66bcc0b3ecb51a079/src/ngx_http_modsecurity_header_filter.c#L527
coraza.process_response_headers(ngx_ctx.transaction, ngx.status, "HTTP 1.1") coraza.process_response_headers(ngx_ctx.transaction, ngx.status, "HTTP 1.1")
-- TODO: add http response body to coraza.append_response_body. Openresty can't disrupt the body_filter phrase
--local resp_body = string.sub(ngx.arg[1], 1, 1000)
--ngx.ctx.buffered = (ngx.ctx.buffered or "") .. resp_body
--if ngx.arg[2] then
-- ngx.var.resp_body = ngx.ctx.buffered
--end
--
--coraza.append_response_body(ngx_ctx.transaction, ngx.ctx.buffered)
--coraza.process_response_body(ngx_ctx.transaction)
ngx_ctx.action, ngx_ctx.status_code = coraza.intervention(ngx_ctx.transaction) ngx_ctx.action, ngx_ctx.status_code = coraza.intervention(ngx_ctx.transaction)
end end
function _M.do_body_filter()
-- TODO
end
function _M.do_log() function _M.do_log()
local msg = coraza.get_matched_logmsg(ngx_ctx.transaction) local msg = coraza.get_matched_logmsg(ngx_ctx.transaction)
ngx_ctx.coraza_msg = msg ngx_ctx.coraza_msg = msg