Crediantials in Yarp #2290
-
What should we add or change to make your life better?Why is this important to you?hey i m trying to pass some credentials in the request header to auto authenticate to another power Pi server but it keeps asking me for credentials var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); app.MapReverseProxy(); app.UseMiddleware(); app.Run(); ` |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
How are you setting the credentials? (Don't show us the actual credentials 😆). I suggest adding the header directly to the outgoing HttpRequestMessage using a request transform. reverse-proxy/samples/ReverseProxy.Transforms.Sample/Startup.cs Lines 48 to 55 in 27554a3 |
Beta Was this translation helpful? Give feedback.
How are you setting the credentials? (Don't show us the actual credentials 😆).
I suggest adding the header directly to the outgoing HttpRequestMessage using a request transform.
https://microsoft.github.io/reverse-proxy/articles/transforms.html#addrequesttransform
reverse-proxy/samples/ReverseProxy.Transforms.Sample/Startup.cs
Lines 48 to 55 in 27554a3