Files
KonSoft.Clean/shared/KonSoft.Shared.Hosting.Gateways/KonSoftSharedHostingGatewaysModule.cs

22 lines
687 B
C#

using KonSoft.Shared.Hosting.AspNetCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace KonSoft.Shared.Hosting.Gateways;
[DependsOn(
typeof(KonSoftSharedHostingAspNetCoreModule)
)]
public class KonSoftSharedHostingGatewaysModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
context.Services.AddHttpForwarderWithServiceDiscovery();
context.Services.AddReverseProxy()
.LoadFromConfig(configuration.GetSection("ReverseProxy"))
.AddServiceDiscoveryDestinationResolver();
}
}