ProxyFeature excluding hosted services

When using the ProxyFeature and in the delegate for matchingRequests, is it possible to add all service operation routes that belong to services in the AppHost where the feature is used, so that those service operations are not proxied?

Or do we have to exclude each service operation route (both declared [Route] and the built-in ReplyTo route), manually?

Any shortcuts that don’t involve having to keep this list up to date for every operation we add to this AppHost?
(I assume there is a way to get all the routes for all the services registered in the current AppHost).

You can cycle through your Services Metadata to check that it doesn’t match any user-defined routes with something like:

Plugins.Add(new ProxyFeature(
    matchingRequests: req => !Metadata.Operations
        .Any(x => x.Routes.Any(r => r.IsMatch(req))),
    ...));

This only checks against user-defined routes, it’s not going account for any pre-defined routes, custom handlers registered by plugins, request filters, etc. IMO it’s better to have a white list of paths that should be proxied instead of a black list that shouldn’t.