-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
In-PRIssues that have a PR open for them.Issues that have a PR open for them.Needs: Triage 🔍Label added to new issues which need TriageLabel added to new issues which need Triage
Description
Summary
If it is possible, I would like to move middleware inside HttpContextStartupFilter into UseSystemWebAdapters(this IApplicationBuilder app).
Motivation and goals
- gRPC does not work when services.AddSystemWebAdapters() is used
- moving this to middleware will allow developers to branch middleware when the content type is gRPC
- StatusCode="Internal", Detail="Failed to deserialize response message." when using System.WebAdapters grpc/grpc-dotnet#2340
Risks / unknowns
I'm not sure if the middleware order will be affected by this move.
I don't think developers will notice this change, app.UseSystemWebAdapters() should always be configured during startup. Perhaps, there is something I am missing, but documentation could also be updated to include this.
Examples
app.UseWhen(
context => context.Request.ContentType != "application/grpc",
builder =>
{
builder.UseSystemWebAdapters();
}
);
Metadata
Metadata
Assignees
Labels
In-PRIssues that have a PR open for them.Issues that have a PR open for them.Needs: Triage 🔍Label added to new issues which need TriageLabel added to new issues which need Triage