Open
Description
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
- Make Aspire project and create Yarp project with reference to
api
service. - Setup forwarder with following code.
var transformer = app.ServiceProvider.GetRequiredService<ITransformBuilder>().Create(transformBuilderContext
=> transformBuilderContext
.AddPathRemovePrefix("/Api"));
#if ASSIGN_HTTP_CLIENT
var httpClient = new HttpMessageInvoker(new SocketsHttpHandler
{
UseProxy = false,
AllowAutoRedirect = true,
ConnectTimeout = TimeSpan.FromSeconds(30),
});
app.MapForwarder("/Api/{**apiPath}", "https://api", ForwarderRequestConfig.Empty, transformer, httpClient);
#else
app.MapForwarder("/Api/{**apiPath}", "https://api", ForwarderRequestConfig.Empty, transformer);
#endif
- Access to forwarder's path and it works correctly.
- define
ASSIGN_HTTP_CLIENT
. - Access to forwarder's path.
- It respond with error codes, and logs say "No such host".
Further technical details
- Include the version of the packages you are using
- Yarp.Reverse Proxy 2.3.0
- The platform (Linux/macOS/Windows)
- Windows 11 Pro 10.0.26100 Build 26100