From ca879543c59d22ce75e76cc16b0a03125058eaa4 Mon Sep 17 00:00:00 2001 From: wiaamm Date: Sat, 6 Dec 2025 21:42:13 +0200 Subject: [PATCH] ngx.arg[1] = nil --- .../kong/plugins/open-appsec-waf-kong-plugin/handler.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/attachments/kong/plugins/open-appsec-waf-kong-plugin/handler.lua b/attachments/kong/plugins/open-appsec-waf-kong-plugin/handler.lua index 2dda329..1a0dcab 100755 --- a/attachments/kong/plugins/open-appsec-waf-kong-plugin/handler.lua +++ b/attachments/kong/plugins/open-appsec-waf-kong-plugin/handler.lua @@ -238,6 +238,9 @@ function NanoHandler.body_filter(conf) local session_data = ctx.session_data if not session_id or not session_data or ctx.session_finalized then + -- Clear the chunk to release it from memory immediately + -- Without this, Kong holds chunks in memory causing OOM + ngx.arg[1] = nil return end