File tree Expand file tree Collapse file tree
aikido_zen/sources/functions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ def pre_response():
5050 return message , 403
5151
5252 # Do a check on firewall lists, this happens in background because of the heavy data.
53+ # For the timeout we notice the request during heavy loads usually takes 2ms - 2.5ms, we set timeout at 10ms.
54+ # That way we have a very small timeout with very little risk of not blocking ips.
5355 comms = c .get_comms ()
5456 check_fw_lists_res = comms .send_data_to_bg_process (
5557 action = "CHECK_FIREWALL_LISTS" ,
@@ -58,7 +60,7 @@ def pre_response():
5860 "user-agent" : context .get_user_agent (),
5961 },
6062 receive = True ,
61- timeout_in_sec = (20 / 1000 ),
63+ timeout_in_sec = (10 / 1000 ),
6264 )
6365 if not check_fw_lists_res ["success" ] or not check_fw_lists_res ["data" ]["blocked" ]:
6466 return
You can’t perform that action at this time.
0 commit comments