From dc750b3fa334088e85536c41ceb0f072dfb3006b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Wed, 20 Nov 2024 00:19:29 +0800 Subject: [PATCH] 127.0. --- Stardust.Extensions/TracerMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stardust.Extensions/TracerMiddleware.cs b/Stardust.Extensions/TracerMiddleware.cs index 9db2f234..cd4313d9 100644 --- a/Stardust.Extensions/TracerMiddleware.cs +++ b/Stardust.Extensions/TracerMiddleware.cs @@ -229,7 +229,7 @@ public static void SaveServiceAddress(HttpContext ctx) if (!ss.Contains(baseAddress)) { // 过滤掉本机地址 - ss = ss.Where(e => !e.EqualIgnoreCase("127.0.0.1", "localhost", "[::1]")).ToList(); + ss = ss.Where(e => !e.EqualIgnoreCase("127.0.0.1", "localhost", "[::1]") && !e.StartsWith("127.0.")).ToList(); ss.Insert(0, baseAddress); set.ServiceAddress = ss.Take(5).Join(",");