diff --git a/attachments/kong/plugins/open-appsec-waf-kong-plugin/nano_ffi.lua b/attachments/kong/plugins/open-appsec-waf-kong-plugin/nano_ffi.lua index d8049dc..eec1213 100755 --- a/attachments/kong/plugins/open-appsec-waf-kong-plugin/nano_ffi.lua +++ b/attachments/kong/plugins/open-appsec-waf-kong-plugin/nano_ffi.lua @@ -91,11 +91,6 @@ function nano.handle_custom_response(session_data, response) return kong.response.exit(200, "Request allowed due to attachment unavailability") end - if not session_data or not response then - kong.log.err("Invalid session_data or response in handle_custom_response") - return kong.response.exit(500, "Internal Server Error") - end - local response_type = nano_attachment.get_web_response_type(attachment, session_data, response) if response_type == nano.WebResponseType.RESPONSE_CODE_ONLY then @@ -269,12 +264,6 @@ end function nano.handleHeaders(headers) local header_data = nano_attachment.allocHttpHeaders() - - if not header_data then - kong.log.err("Failed to allocate HTTP headers") - return nil - end - table.insert(nano.allocate_headers, header_data) local index = 0