mirror of
https://github.com/potats0/lua-resty-coraza.git
synced 2025-06-28 17:41:00 +03:00
fixed: 修复拦截动作的默认响应吗为403
This commit is contained in:
parent
1f18facad0
commit
ed1bc2b098
@ -228,6 +228,9 @@ function _M.intervention(transaction)
|
|||||||
local status_code = tonumber(intervention.status)
|
local status_code = tonumber(intervention.status)
|
||||||
--free intervention to avoid memory leak
|
--free intervention to avoid memory leak
|
||||||
coraza.coraza_free_intervention(intervention)
|
coraza.coraza_free_intervention(intervention)
|
||||||
|
if status_code == 0 then
|
||||||
|
status_code = 403
|
||||||
|
end
|
||||||
nlog(debug_fmt("Transaction %s disrupted with status %s action %s",
|
nlog(debug_fmt("Transaction %s disrupted with status %s action %s",
|
||||||
ngx_ctx.request_id, status_code, action))
|
ngx_ctx.request_id, status_code, action))
|
||||||
return action, status_code
|
return action, status_code
|
||||||
|
Loading…
x
Reference in New Issue
Block a user