Skip to content

.NET 9 Web App with YARP Proxy in virtual directories #2783

Closed Answered by Scorpoon
Scorpoon asked this question in Q&A
Discussion options

You must be logged in to vote

Resolved by adding the "AllowAutoRedirect" option to the proxy:

_ = builder.Services.AddReverseProxy()
            .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"))
            .ConfigureHttpClient((_, handler) => handler.AllowAutoRedirect = true);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Scorpoon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant