Authorised Territory code examples - This .NET 8 #aspnetcore #tutorial shows how to short-circuit middleware after routing where endpoint logic is invoked and request ended.
First, we setup http logging and set up short circuiting for multiple routes.
Next, we demonstrate the http logging working for certain routes and not for others.
We setup an endpoint to return JSON and call .ShortCircuit() to end the request.
Finally, we view the result in the browser and the console window.