This fix is localized to the YARP Service Discovery integration. It fixes the localhost+HTTPS scenario from the linked bug: https://github.com/dotnet/aspire/issues/3991. Previously, that would fail due to mismatch between the dev cert and the Host header.
Testing
Tests added, customer validated private build.
Risk
Very low. This behavior is localized to YARP+SD and only takes effect when a URI resolves to localhost and no Host value was explicitly set in YARP configuration.
Backport of #4069 to release/8.0
/cc @ReubenBond
Customer Impact
This fix is localized to the YARP Service Discovery integration. It fixes the localhost+HTTPS scenario from the linked bug: https://github.com/dotnet/aspire/issues/3991. Previously, that would fail due to mismatch between the dev cert and the Host header.
Testing
Tests added, customer validated private build.
Risk
Very low. This behavior is localized to YARP+SD and only takes effect when a URI resolves to localhost and no Host value was explicitly set in YARP configuration.
Regression?
No
Microsoft Reviewers: Open in CodeFlow