Skip to content

Commit

Permalink
fix(chaitin-waf): fix event_id is nil (#11651)
Browse files Browse the repository at this point in the history
  • Loading branch information
xbingW authored Feb 25, 2025
1 parent cc7441f commit 61b52fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apisix/plugins/chaitin-waf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 61b52fd

Please sign in to comment.