mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-23 00:32:50 +08:00
Fix extended coverage main pipeline bug (#510)
This commit is contained in:
parent
b0a20d13b9
commit
8711b07de6
@ -172,7 +172,7 @@ namespace Ocelot.Middleware.Pipeline
|
||||
throw new ArgumentNullException(nameof(pipelineBuilderFunc));
|
||||
}
|
||||
var branchBuilder = app.New();
|
||||
var predicate = pipelineBuilderFunc.Invoke(app);
|
||||
var predicate = pipelineBuilderFunc.Invoke(branchBuilder);
|
||||
var branch = branchBuilder.Build();
|
||||
|
||||
var options = new MapWhenOptions
|
||||
|
@ -28,15 +28,6 @@ namespace Ocelot.Middleware.Pipeline
|
||||
// It also sets the Request Id if anything is set globally
|
||||
builder.UseExceptionHandlerMiddleware();
|
||||
|
||||
//Expand other branch pipes
|
||||
if (pipelineConfiguration.MapWhenOcelotPipeline != null)
|
||||
{
|
||||
foreach (var pipeline in pipelineConfiguration.MapWhenOcelotPipeline)
|
||||
{
|
||||
builder.MapWhen(pipeline);
|
||||
}
|
||||
}
|
||||
|
||||
// If the request is for websockets upgrade we fork into a different pipeline
|
||||
builder.MapWhen(context => context.HttpContext.WebSockets.IsWebSocketRequest,
|
||||
app =>
|
||||
@ -57,6 +48,15 @@ namespace Ocelot.Middleware.Pipeline
|
||||
// Then we get the downstream route information
|
||||
builder.UseDownstreamRouteFinderMiddleware();
|
||||
|
||||
//Expand other branch pipes
|
||||
if (pipelineConfiguration.MapWhenOcelotPipeline != null)
|
||||
{
|
||||
foreach (var pipeline in pipelineConfiguration.MapWhenOcelotPipeline)
|
||||
{
|
||||
builder.MapWhen(pipeline);
|
||||
}
|
||||
}
|
||||
|
||||
// Now we have the ds route we can transform headers and stuff?
|
||||
builder.UseHttpHeadersTransformationMiddleware();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user