/// <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);
        }
Ejemplo n.º 2
0
        /// <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);
        }