Skip to content

Commit

Permalink
Update direct-forwarding.md (dotnet#2431) (dotnet#2432)
Browse files Browse the repository at this point in the history
remove duplicate code in snippet

Co-authored-by: Juergen Gutsch <juergen@gutsch-online.de>
  • Loading branch information
MihaZupan and JuergenGutsch authored Mar 12, 2024
1 parent 3c6ff2c commit e678db4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions docs/docfx/articles/direct-forwarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,10 @@ var httpClient = new HttpMessageInvoker(new SocketsHttpHandler()

// Setup our own request transform class
var transformer = new CustomTransformer(); // or HttpTransformer.Default;
var requestOptions = new ForwarderRequestConfig { ActivityTimeout = TimeSpan.FromSeconds(100) };
var requestConfig = new ForwarderRequestConfig { ActivityTimeout = TimeSpan.FromSeconds(100) };

app.UseRouting();

var transformer = new CustomTransformer(); // or HttpTransformer.Default;
var requestConfig = new ForwarderRequestConfig { ActivityTimeout = TimeSpan.FromSeconds(100) };

// When using IHttpForwarder for direct forwarding you are responsible for routing, destination discovery, load balancing, affinity, etc..
// For an alternate example that includes those features see BasicYarpSample.
app.Map("/test/{**catch-all}", async (HttpContext httpContext, IHttpForwarder forwarder) =>
Expand Down

0 comments on commit e678db4

Please sign in to comment.