It is possible to define the proxy for a set of resources with the same URL prefix. If the request URL matches a rule, then the request will be routed through the proxy. To define a proxy rule specify the url for the proxy and the prefix for the resources that need to be accessed through the proxy.
urlUtils.addProxyRule({ urlPrefix: "route.arcgis.com", proxyUrl: "<url_to_proxy>" });
This means that you can add proxy rules only for the services that you want to go through the proxy and exclude all the others.
Here is more detailed documentation about the proxy in JavaScript
Using the proxy | Guide | ArcGIS API for JavaScript