Skip to content

Yarp and mTLS #2396

Answered by ilmax
ilmax asked this question in Q&A
Feb 9, 2024 · 1 comments · 3 replies
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 3 replies

Comment options

You must be logged in to vote
3 replies
@pastrasigns
Comment options

@MihaZupan
Comment options

@pastrasigns
Comment options

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
3 participants