From a35e2c8a6eda67842e35bd9070646d95b75dc451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=85=86=E9=91=AB?= Date: Sun, 2 Nov 2025 00:03:13 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=85=B3=E9=97=AD=E7=BD=91=E5=85=B3?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8F=91=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gateways/KonSoft.InternalGateway/Program.cs | 1 - .../AbpHostingHostBuilderExtensions.cs | 27 ------------------- .../KonSoftSharedHostingGatewaysModule.cs | 4 +-- 3 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 shared/KonSoft.Shared.Hosting.Gateways/AbpHostingHostBuilderExtensions.cs diff --git a/gateways/KonSoft.InternalGateway/Program.cs b/gateways/KonSoft.InternalGateway/Program.cs index 85a050f..1aa52aa 100644 --- a/gateways/KonSoft.InternalGateway/Program.cs +++ b/gateways/KonSoft.InternalGateway/Program.cs @@ -18,7 +18,6 @@ try }); builder.Host .AddAppSettingsSecretsJson() - .AddYarpJson() .UseAutofac() .UseSerilog(); diff --git a/shared/KonSoft.Shared.Hosting.Gateways/AbpHostingHostBuilderExtensions.cs b/shared/KonSoft.Shared.Hosting.Gateways/AbpHostingHostBuilderExtensions.cs deleted file mode 100644 index a716374..0000000 --- a/shared/KonSoft.Shared.Hosting.Gateways/AbpHostingHostBuilderExtensions.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; - -namespace KonSoft.Shared.Hosting.Gateways -{ - public static class AbpHostingHostBuilderExtensions - { - public const string AppYarpJsonPath = "yarp.json"; - - public static IHostBuilder AddYarpJson( - this IHostBuilder hostBuilder, - bool optional = true, - bool reloadOnChange = true, - string path = AppYarpJsonPath) - { - return hostBuilder.ConfigureAppConfiguration((_, builder) => - { - builder.AddJsonFile( - path: AppYarpJsonPath, - optional: optional, - reloadOnChange: reloadOnChange - ) - .AddEnvironmentVariables(); - }); - } - } -} diff --git a/shared/KonSoft.Shared.Hosting.Gateways/KonSoftSharedHostingGatewaysModule.cs b/shared/KonSoft.Shared.Hosting.Gateways/KonSoftSharedHostingGatewaysModule.cs index d9ad282..a13fec5 100644 --- a/shared/KonSoft.Shared.Hosting.Gateways/KonSoftSharedHostingGatewaysModule.cs +++ b/shared/KonSoft.Shared.Hosting.Gateways/KonSoftSharedHostingGatewaysModule.cs @@ -16,7 +16,7 @@ public class KonSoftSharedHostingGatewaysModule : AbpModule context.Services.AddHttpForwarderWithServiceDiscovery(); context.Services.AddReverseProxy() - .LoadFromConfig(configuration.GetSection("ReverseProxy")) - .AddServiceDiscoveryDestinationResolver(); + .LoadFromConfig(configuration.GetSection("ReverseProxy")); + //.AddServiceDiscoveryDestinationResolver(); } } \ No newline at end of file