-
The ReverseProxy.Code.Sample has the below code in it's custom middleware. Based on the Todo comment, is there an example somewhere of looking up or using metadata in the middleware? This code sample is not exactly what I'm trying to do. I need to determine whether or not to proxy the request based on metadata of the selected route. It looks like ReverseProxyFeature.Route will work to get the Metadata of the route. // Filter destinations based on criteria
foreach (var d in availableDestinationsFeature.AvailableDestinations)
{
//Todo: Replace with a lookup of metadata - but not currently exposed correctly here
if (d.DestinationId.Contains("debug") == useDebugDestinations) { filteredDestinations.Add(d); }
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You're looking for IReverseProxyFeature.Route.Config.Metadata. availableDestinationsFeature in that sample is the IReverseProxyFeature, it just has an outdated name. |
Beta Was this translation helpful? Give feedback.
You're looking for IReverseProxyFeature.Route.Config.Metadata. availableDestinationsFeature in that sample is the IReverseProxyFeature, it just has an outdated name.