-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Description
UseWhen also branches the request pipeline based on the result of the given predicate. Unlike with MapWhen, this branch is rejoined to the main pipeline if it doesn't short-circuit or contain a terminal middleware:
From https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-8.0
When a middleware short-circuits, it's called a terminal middleware because it prevents further middleware from processing the request.
Thus, as I understand, there has to be either "doesn't short-circuit" or "contain a terminal middleware" but no both.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/middleware/index.md
Document ID
3926c686-0ccc-f9fe-ca52-0134612a1623