Browse Source

Update kafka-logger.lua

main
有安科技 2 months ago
parent
commit
e0ac371b23
  1. 2
      plugins/kafka-logger.lua

2
plugins/kafka-logger.lua

@ -37,7 +37,7 @@ function _M.log_post_filter(waf)
if waf.msg then if waf.msg then
local country, province, city = log.ip2loc(waf.ip) local country, province, city = log.ip2loc(waf.ip)
local info = { rule_id = waf.rule_id, ip = waf.ip, host = waf.host, url = waf.reqUri, data = waf.msg, country = country, province = province, city = city, create_at = ngx.localtime() } local info = { rule_id = waf.rule_id, ip = waf.ip, host = waf.host, url = waf.reqUri, data = log.utf8(waf.msg), req = log.utf8(log.getReq()), country = country, province = province, city = city, create_at = ngx.localtime() }
log.broker(kafkaLog, brokerList, info) log.broker(kafkaLog, brokerList, info)
end end
end end

Loading…
Cancel
Save