Gateway proxy for contained frontend to access other services

This commit is contained in:
2025-07-25 22:24:02 +08:00
parent a4b84f0717
commit d13fb8b0e4
8 changed files with 109 additions and 5 deletions

View File

@@ -8,7 +8,8 @@ public static class RegistryStartup
{
public static IServiceCollection AddRegistryService(
this IServiceCollection services,
IConfiguration configuration
IConfiguration configuration,
bool addForwarder = true
)
{
services.AddEtcdClient(options =>
@@ -19,6 +20,9 @@ public static class RegistryStartup
services.AddSingleton<ServiceRegistry>();
services.AddHostedService<RegistryHostedService>();
if (addForwarder)
services.AddHttpForwarder();
return services;
}
}