You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make sure my config is valid on startup instead of later when we try to use it. To that end I setup a simple hosted service that will get the config on start and run the endpoints and clusters through the validator and throw if there's an error. However even with a null destination address I don't get any warnings.
To Reproduce
setup a yarp with a basic route config and this as your cluster config:
validation doesn't throw an error, however when you try to use the route you obviously get an exception:
System.ArgumentNullException: Value cannot be null. (Parameter 'destinationPrefix')
at Yarp.ReverseProxy.Forwarder.HttpForwarder.SendAsync(HttpContext context, String destinationPrefix, HttpMessageInvoker httpClient, ForwarderReq
uestConfig requestConfig, HttpTransformer transformer, CancellationToken cancellationToken)
at Yarp.ReverseProxy.Forwarder.ForwarderMiddleware.Invoke(HttpContext context)
at LexSyncReverseProxy.ProxyKernel.<>c.<<MapSyncProxy>b__1_1>d.MoveNext() in C:\dev\LexBox\backend\SyncReverseProxy\ProxyKernel.cs:line 74
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Further technical details
version: 2.0.1
windows 11
The text was updated successfully, but these errors were encountered:
We try not to be too strict about destination address validation to avoid blocking customization like UDS. That said, I don't know if there's a valid scenario for 'null' or empty ''.
Describe the bug
I'm trying to make sure my config is valid on startup instead of later when we try to use it. To that end I setup a simple hosted service that will get the config on start and run the endpoints and clusters through the validator and throw if there's an error. However even with a null destination address I don't get any warnings.
To Reproduce
setup a yarp with a basic route config and this as your cluster config:
validation doesn't throw an error, however when you try to use the route you obviously get an exception:
Further technical details
The text was updated successfully, but these errors were encountered: