With ESRI's Javascript API – is it possible to make only certain layers go through the proxy?
I know this is possible in the Flex API via proxyUrl property of applicable layers.
Right now i have this code in my initialization function – but all map content is now routed through proxy.
esri.config.defaults.io.proxyUrl = "proxy.ashx";
esri.config.defaults.io.alwaysUseProxy = true;
Best Answer
For future reference, v3.4 of the Javascript API added
esri.config.defaults.io.proxyRules
, which allows you to use the proxy for some services:https://developers.arcgis.com/javascript/jsapi/esri.urlutils-amd.html#addproxyrule