Skip to content

Yarp and mTLS #2396

Answered by ilmax
ilmax asked this question in Q&A
Feb 9, 2024 · 1 comment
Discussion options

You must be logged in to vote

I just figured out that the issue was due to the host header not being set in the request so Yarp was copying it from the current request (the one to the yarp service) which was localhost.

The fix is at easy as adding:

proxyRequest.Headers.Host = new Uri(destinationPrefix).Host;

in the MyHttpTransformer class.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by karelz
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