mirror of
https://github.com/openappsec/attachment.git
synced 2025-12-31 05:39:07 +03:00
remove processed_requests
This commit is contained in:
@@ -8,9 +8,6 @@ local NanoHandler = {}
|
||||
NanoHandler.PRIORITY = 3000
|
||||
NanoHandler.VERSION = "1.0.0"
|
||||
|
||||
NanoHandler.sessions = {}
|
||||
NanoHandler.processed_requests = {}
|
||||
|
||||
function NanoHandler.init_worker()
|
||||
nano.init_attachment()
|
||||
end
|
||||
@@ -20,11 +17,6 @@ function NanoHandler.access(conf)
|
||||
local session_id = nano.generate_session_id()
|
||||
kong.service.request.set_header("x-session-id", tostring(session_id))
|
||||
|
||||
if NanoHandler.processed_requests[session_id] then
|
||||
kong.ctx.plugin.blocked = true
|
||||
return
|
||||
end
|
||||
|
||||
local session_data = nano.init_session(session_id)
|
||||
if not session_data then
|
||||
kong.log.err("Failed to initialize session - failing open")
|
||||
@@ -143,8 +135,6 @@ function NanoHandler.access(conf)
|
||||
return nano.handle_custom_response(session_data, response)
|
||||
end
|
||||
end
|
||||
|
||||
NanoHandler.processed_requests[session_id] = true
|
||||
end
|
||||
|
||||
function NanoHandler.header_filter(conf)
|
||||
|
||||
Reference in New Issue
Block a user