From 0ed76ed241263aa562220307053885c2a35acc4b Mon Sep 17 00:00:00 2001 From: area363 Date: Mon, 18 Sep 2023 14:10:35 +0900 Subject: [PATCH] update gql management2 --- .../ActionEvaluationPublisher.cs | 25 +++++++++++-------- .../Middleware/HttpCaptureMiddleware.cs | 2 ++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/NineChronicles.Headless/ActionEvaluationPublisher.cs b/NineChronicles.Headless/ActionEvaluationPublisher.cs index 04ce65488..8f49a2273 100644 --- a/NineChronicles.Headless/ActionEvaluationPublisher.cs +++ b/NineChronicles.Headless/ActionEvaluationPublisher.cs @@ -296,21 +296,24 @@ public IdGroupFinder(IMemoryCache memoryCache) // Step 1: Construct the adjacency list foreach (var kvp in dict) { - var ip = kvp.Key; - if (!adjacencyList.ContainsKey(ip)) + if (kvp.Key != "1") { - adjacencyList[ip] = new List(); - } - - foreach (var id in kvp.Value) - { - adjacencyList[ip].Add(id); + var ip = kvp.Key; + if (!adjacencyList.ContainsKey(ip)) + { + adjacencyList[ip] = new List(); + } - if (!adjacencyList.ContainsKey(id)) + foreach (var id in kvp.Value) { - adjacencyList[id] = new List(); + adjacencyList[ip].Add(id); + + if (!adjacencyList.ContainsKey(id)) + { + adjacencyList[id] = new List(); + } + adjacencyList[id].Add(ip); } - adjacencyList[id].Add(ip); } } diff --git a/NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs b/NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs index 10d50c44b..6608299aa 100644 --- a/NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs +++ b/NineChronicles.Headless/Middleware/HttpCaptureMiddleware.cs @@ -96,6 +96,8 @@ action is CombinationEquipment || remoteIpAddress = "1"; UpdateIpSignerList(remoteIpAddress, agent); AddClientIpInfo(agent, remoteIpAddress); + UpdateIpSignerList(remoteIp, agent); + AddClientIpInfo(agent, remoteIp); } _logger.Information("[GRAPHQL-REQUEST-CAPTURE] IP: {IP} Agent: {Agent} Tx: {Path}",