Enable direct cancellation for IHttpForwarder #1985
Conversation
|
While on the topic, should we augment |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
de294d5 to
69fb774
Compare
Updated. How does that look @MihaZupan? |
There was a problem hiding this comment.
Looks good.
We should also add CTs to the new extension methods we just added - https://github.com/microsoft/reverse-proxy/blob/main/src/ReverseProxy/Routing/DirectForwardingIEndpointRouteBuilderExtensions.cs. I can do that as a followup.
Nvm :)
? Those are route table wire-up methods, there's nothing to cancel. The one place we do call the forwarder would only ever be cancelled by the RequestAborted token. |
Fixes #1542
Some customers using IHttpForwarder directly have asked for the ability to pass their own cancellation token. Today they have to replace HttpContext.RequestAborted which can be error prone.
This uses a Default Interface Method to avoid a breaking change.