I need to write an small ASP.NET MVC website which sole purpose is to capture headers sent from a legacy website, add these headers to a request and redirect to a Blazor server app (including headers).
How can I add headers to a request and redirect to an external URL in a controller action?
I've tried HttpClient, WebClient and HttpWebRequest but none support redirecting.
I also tried:
Response.Headers.Add("Test", "Test redirect");Response.Redirect("https://mywebsite.com/", true);The redirection works but the header is not added.