So I want IIS to basically not do anything when certain urls are requested bacause I want react router to which I have rendered from serverside, to handle the request.
Used this link
I have created a middleware that checks each request. Now i dont know how to ignore or abort this request once I find the right urls.
public class IgnoreRouteMiddleware
{
private readonly RequestDelegate next;
// You can inject a dependency here that gives you access
// to your ignored route configuration.
public IgnoreRouteMiddleware(RequestDelegate next)
{
this.next = next;
}
public async Task Invoke(HttpContext context)
{
if (context.Request.Path.HasValue &&
context.Request.Path.Value!="/")
{
// cant stop anything here. Want to abort to ignore this request
}
await next.Invoke(context);
}
}