Ocelot/test/Ocelot.ManualTest/ManualTestStartup.cs
Tom Pallister 98133d9473
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
2018-02-13 09:07:09 +00:00

37 lines
1.1 KiB
C#

using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Ocelot.DependencyInjection;
using Ocelot.Middleware;
namespace Ocelot.ManualTest
{
public class ManualTestStartup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddAuthentication()
.AddJwtBearer("TestKey", x =>
{
x.Authority = "test";
x.Audience = "test";
});
services.AddOcelot()
.AddCacheManager(x =>
{
x.WithDictionaryHandle();
})
.AddOpenTracing(option =>
{
option.CollectorUrl = "http://localhost:9618";
option.Service = "Ocelot.ManualTest";
})
.AddAdministration("/administration", "secret");
}
public void Configure(IApplicationBuilder app)
{
app.UseOcelot().Wait();
}
}
}