mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 14:10:50 +08:00 
			
		
		
		
	Feature/expose http handlers (#224)
* temp commit * trying to work out how to expose the http handlers in a decent way.. * pissing about at lunch * changed to func so you can instanciate object or new it up each time * docs for dele handlers * upgraded to sdk 2.1.4 * some validation for consul services
This commit is contained in:
		@@ -1,13 +1,7 @@
 | 
			
		||||
using System;
 | 
			
		||||
using CacheManager.Core;
 | 
			
		||||
using Microsoft.AspNetCore.Builder;
 | 
			
		||||
using Microsoft.AspNetCore.Hosting;
 | 
			
		||||
using Microsoft.Extensions.Configuration;
 | 
			
		||||
using Microsoft.Extensions.DependencyInjection;
 | 
			
		||||
using Microsoft.Extensions.Logging;
 | 
			
		||||
using Ocelot.DependencyInjection;
 | 
			
		||||
using Ocelot.Middleware;
 | 
			
		||||
using ConfigurationBuilder = Microsoft.Extensions.Configuration.ConfigurationBuilder;
 | 
			
		||||
 | 
			
		||||
namespace Ocelot.ManualTest
 | 
			
		||||
{
 | 
			
		||||
@@ -15,11 +9,6 @@ namespace Ocelot.ManualTest
 | 
			
		||||
    {
 | 
			
		||||
        public void ConfigureServices(IServiceCollection services)
 | 
			
		||||
        {
 | 
			
		||||
            Action<ConfigurationBuilderCachePart> settings = (x) =>
 | 
			
		||||
            {
 | 
			
		||||
                x.WithDictionaryHandle();
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            services.AddAuthentication()
 | 
			
		||||
                .AddJwtBearer("TestKey", x =>
 | 
			
		||||
                {
 | 
			
		||||
@@ -28,7 +17,10 @@ namespace Ocelot.ManualTest
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
            services.AddOcelot()
 | 
			
		||||
                    .AddCacheManager(settings)
 | 
			
		||||
                    .AddCacheManager(x =>
 | 
			
		||||
                    {
 | 
			
		||||
                        x.WithDictionaryHandle();
 | 
			
		||||
                    })
 | 
			
		||||
                    .AddOpenTracing(option =>
 | 
			
		||||
                    {
 | 
			
		||||
                        option.CollectorUrl = "http://localhost:9618";
 | 
			
		||||
@@ -42,4 +34,4 @@ namespace Ocelot.ManualTest
 | 
			
		||||
            app.UseOcelot().Wait();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user