✨ Gateway proxy for contained frontend to access other services
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user