/// <summary> /// Adds ReverseProxy's services to Dependency Injection. /// </summary> public static IReverseProxyBuilder AddReverseProxy(this IServiceCollection services) { var builder = new ReverseProxyBuilder(services); builder .AddTelemetryShims() .AddMetrics() .AddInMemoryRepos() .AddConfigBuilder() .AddRuntimeStateManagers() .AddConfigManager() .AddDynamicEndpointDataSource() .AddProxy() .AddBackgroundWorkers(); return(builder); }
/// <summary> /// Adds ReverseProxy's services to Dependency Injection. /// </summary> public static IReverseProxyBuilder AddReverseProxy(this IServiceCollection services) { var builder = new ReverseProxyBuilder(services); builder .AddTelemetryShims() .AddConfigBuilder() .AddRuntimeStateManagers() .AddConfigManager() .AddSessionAffinityProvider() .AddProxy() .AddBackgroundWorkers(); services.AddDataProtection(); services.AddAuthorization(); services.AddCors(); services.AddRouting(); return(builder); }