Skip to content

how to reverse proxy multiple sites #2161

Answered by Tratcher
wchucgf asked this question in Q&A
Discussion options

You must be logged in to vote

You've mostly got it. Some notes:

Endpoint HTTPS-cgimps01.yarp123.com will need some kind of certificate, HTTPS must always have one.

"route1": {"ClusterId": "wsqa.yarp123.com","Match": {"Path": "wsqa.yarp123.com"},
You need to match the Hosts, not Path.
"route1": {"ClusterId": "wsqa.yarp123.com","Match": {"Hosts" : [ "wsqa.yarp123.com" ]},
Note there's an explicit check that this host header matches the certificate, that's handled by SNI at the TLS layer. Per request you could add a middleware to verify the SNI matches the host header. dotnet/aspnetcore#34525 makes this easier, but I think you can get the SslStream from HttpContext.Features and check it that way.

"avd.yarp123.com": {"Des…

Replies: 1 comment 3 replies

Comment options

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

@Tratcher
Comment options

@wchucgf
Comment options

Answer selected by samsp-msft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants