fix 关闭网关服务发现
This commit is contained in:
		@ -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();
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -16,7 +16,7 @@ public class KonSoftSharedHostingGatewaysModule : AbpModule
 | 
			
		||||
        context.Services.AddHttpForwarderWithServiceDiscovery();
 | 
			
		||||
 | 
			
		||||
        context.Services.AddReverseProxy()
 | 
			
		||||
            .LoadFromConfig(configuration.GetSection("ReverseProxy"))
 | 
			
		||||
            .AddServiceDiscoveryDestinationResolver();
 | 
			
		||||
            .LoadFromConfig(configuration.GetSection("ReverseProxy"));
 | 
			
		||||
        //.AddServiceDiscoveryDestinationResolver();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user