Obtenha o URL de solicitação no núcleo do ASP.NET
using Microsoft.AspNetCore.Http.Extensions;
var url = httpContext.Request.GetEncodedUrl();
or
var url = httpContext.Request.GetDisplayUrl();
depending on the purposes.
Itchy Ibex