I\'m developing an ASP.Net Core web application where I need to create a kind of \"authentication proxy\" to another (external) web service.
What I mean by authentic
I had luck using twitchax's AspNetCore.Proxy NuGet package, but could not get it to work using the ProxyRoute
method shown in twitchax's answer. (Could have easily been a mistake on my end.)
Instead I defined the mapping in Statup.cs Configure() method similar to the code below.
app.UseProxy("api/someexternalapp-proxy/{arg1}", async (args) =>
{
string url = "https://someexternalapp.com/" + args["arg1"];
return await Task.FromResult(url);
});