/// <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);
        }
Beispiel #2
0
        /// <summary>
        /// Adds ReverseProxy's services to Dependency Injection.
        /// </summary>
        public static IReverseProxyBuilder AddReverseProxy(this IServiceCollection services)
        {
            var builder = new ReverseProxyBuilder(services);

            builder
            .AddConfigBuilder()
            .AddRuntimeStateManagers()
            .AddConfigManager()
            .AddSessionAffinityProvider()
            .AddActiveHealthChecks()
            .AddPassiveHealthCheck()
            .AddProxy();

            services.AddDataProtection();
            services.AddAuthorization();
            services.AddCors();
            services.AddRouting();

            return(builder);
        }
Beispiel #3
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);
        }
        /// <summary>
        /// Adds ReverseProxy's services to Dependency Injection.
        /// </summary>
        public static IReverseProxyBuilder AddReverseProxy(this IServiceCollection services)
        {
            var builder = new ReverseProxyBuilder(services);

            builder
            .AddConfigBuilder()
            .AddRuntimeStateManagers()
            .AddConfigManager()
            .AddSessionAffinityProvider()
            .AddActiveHealthChecks()
            .AddPassiveHealthCheck()
            .AddLoadBalancingPolicies()
            .AddProxy();

            services.TryAddSingleton <ProxyEndpointFactory>();

            services.AddDataProtection();
            services.AddAuthorization();
            services.AddCors();
            services.AddRouting();

            return(builder);
        }