mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 02:18:15 +08:00
Raft round 2 (#182)
* brought in rafty * moved raft classes into Ocelot and deleted from int project * started to set up rafty in Ocelot * RAFTY INSIDE OCELOT...WOOT * more work adding rafty...just need to get auth working now * rudimentary authenticated raft requests working * asyn await stuff * hacked rafty into the fileconfigurationcontroller...everything seems to be working roughly but I have a lot of refactoring to do * updated to latest rafty that doesnt need an id * hacky but all tests passing * changed admin area set up to use builder not configuration.json, changed admin area auth to use client credentials * missing code coverage * ignore raft sectionf for code coverage * ignore raft sectionf for code coverage * back to normal filters * try exclude attr * missed these * moved client secret to builder for authentication and updated docs * lock to try and fix error accessing identity server created temprsa file on build server * updated postman scripts and changed Ocelot to not always use type handling as this looked crap when manually accessing the configuration endpoint * added rafty docs * changes I missed * added serialisation code we need for rafty to process commands when they proxy to leader * moved controllers into their feature slices
This commit is contained in:
@ -11,9 +11,9 @@ using ConfigurationBuilder = Microsoft.Extensions.Configuration.ConfigurationBui
|
||||
|
||||
namespace Ocelot.ManualTest
|
||||
{
|
||||
public class Startup
|
||||
public class ManualTestStartup
|
||||
{
|
||||
public Startup(IHostingEnvironment env)
|
||||
public ManualTestStartup(IHostingEnvironment env)
|
||||
{
|
||||
var builder = new ConfigurationBuilder()
|
||||
.SetBasePath(env.ContentRootPath)
|
||||
@ -45,7 +45,8 @@ namespace Ocelot.ManualTest
|
||||
x.Audience = "test";
|
||||
});
|
||||
|
||||
services.AddOcelot(Configuration);
|
||||
services.AddOcelot(Configuration)
|
||||
.AddAdministration("/administration", "secret");
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
@ -15,7 +15,7 @@ namespace Ocelot.ManualTest
|
||||
builder.UseKestrel()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISIntegration()
|
||||
.UseStartup<Startup>();
|
||||
.UseStartup<ManualTestStartup>();
|
||||
var host = builder.Build();
|
||||
host.Run();
|
||||
}
|
||||
|
@ -300,12 +300,11 @@
|
||||
"DownstreamHost": "www.bbc.co.uk",
|
||||
"DownstreamPort": 80,
|
||||
"UpstreamPathTemplate": "/bbc/",
|
||||
"UpstreamHttpMethod": [ "Get" ],
|
||||
"UpstreamHttpMethod": [ "Get" ]
|
||||
}
|
||||
],
|
||||
|
||||
"GlobalConfiguration": {
|
||||
"RequestIdKey": "OcRequestId",
|
||||
"AdministrationPath": "/administration"
|
||||
"RequestIdKey": "OcRequestId"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user