Skip to content

Commit 61b52fd

Browse files
authored
fix(chaitin-waf): fix event_id is nil (#11651)
1 parent cc7441f commit 61b52fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apisix/plugins/chaitin-waf.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ local function do_access(conf, ctx)
330330

331331
local code = 200
332332
extra_headers[HEADER_CHAITIN_WAF_STATUS] = code
333-
if result then
334-
if result.status then
333+
if result and result.status and result.status ~= 200 then
334+
if result.event_id then
335335
code = result.status
336336
extra_headers[HEADER_CHAITIN_WAF_STATUS] = code
337337
extra_headers[HEADER_CHAITIN_WAF_ACTION] = "reject"

0 commit comments

Comments
 (0)