This is an automated email from the ASF dual-hosted git repository.
wenming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 61b52fd6d fix(chaitin-waf): fix event_id is nil (#11651)
61b52fd6d is described below
commit 61b52fd6d7eeec8e54a6d2ddb53f6982951147d3
Author: xbingW <[email protected]>
AuthorDate: Tue Feb 25 09:15:20 2025 +0800
fix(chaitin-waf): fix event_id is nil (#11651)
---
apisix/plugins/chaitin-waf.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/apisix/plugins/chaitin-waf.lua b/apisix/plugins/chaitin-waf.lua
index cc870a47f..bc2847ce9 100644
--- a/apisix/plugins/chaitin-waf.lua
+++ b/apisix/plugins/chaitin-waf.lua
@@ -330,8 +330,8 @@ local function do_access(conf, ctx)
local code = 200
extra_headers[HEADER_CHAITIN_WAF_STATUS] = code
- if result then
- if result.status then
+ if result and result.status and result.status ~= 200 then
+ if result.event_id then
code = result.status
extra_headers[HEADER_CHAITIN_WAF_STATUS] = code
extra_headers[HEADER_CHAITIN_WAF_ACTION] = "reject"