short-circuiting
A middleware ending a request by writing the response itself instead of calling the next component.
In more detail
Static files, authentication failures and rate limiting short-circuit deliberately. Do it only with an intentional response that explains why the request stopped.
Related terms
- middleware — Code that sits between an incoming request and the handler that answers it, doing a shared job such as logging, authentication or rate limiting.
- next delegate — The delegate a middleware calls to pass the request to the rest of the pipeline, and whose completion signals the response is on its way back.
Taught in
- The ASP.NET Core Middleware Pipeline — Modern .NET Core, C# & Enterprise Microservices