Disable/Remove '?ReturnUrl=' from Url's in netcore 2
问题 I am trying to find a way to prevent my aspnetcore application to add "?ReturnUrl=" to the URL. Does anyone know how to do it, using some kind of middleware. I tried doing it like below but it did not have any effect: public class RequestHandlerMiddleware { private readonly RequestDelegate _next; public RequestHandlerMiddleware(RequestDelegate next) { _next = next; } public async Task Invoke(HttpContext context) { if(context.Request.QueryString.HasValue && context.Request.QueryString.Value