mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 06:22: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));
|
throw new ArgumentNullException(nameof(pipelineBuilderFunc));
|
||||||
}
|
}
|
||||||
var branchBuilder = app.New();
|
var branchBuilder = app.New();
|
||||||
var predicate = pipelineBuilderFunc.Invoke(app);
|
var predicate = pipelineBuilderFunc.Invoke(branchBuilder);
|
||||||
var branch = branchBuilder.Build();
|
var branch = branchBuilder.Build();
|
||||||
|
|
||||||
var options = new MapWhenOptions
|
var options = new MapWhenOptions
|
||||||
|
@ -28,15 +28,6 @@ namespace Ocelot.Middleware.Pipeline
|
|||||||
// It also sets the Request Id if anything is set globally
|
// It also sets the Request Id if anything is set globally
|
||||||
builder.UseExceptionHandlerMiddleware();
|
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
|
// If the request is for websockets upgrade we fork into a different pipeline
|
||||||
builder.MapWhen(context => context.HttpContext.WebSockets.IsWebSocketRequest,
|
builder.MapWhen(context => context.HttpContext.WebSockets.IsWebSocketRequest,
|
||||||
app =>
|
app =>
|
||||||
@ -57,6 +48,15 @@ namespace Ocelot.Middleware.Pipeline
|
|||||||
// Then we get the downstream route information
|
// Then we get the downstream route information
|
||||||
builder.UseDownstreamRouteFinderMiddleware();
|
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?
|
// Now we have the ds route we can transform headers and stuff?
|
||||||
builder.UseHttpHeadersTransformationMiddleware();
|
builder.UseHttpHeadersTransformationMiddleware();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user