AnsweredAssumed Answered

Layer is using proxy when set to visible and it shouldn't use it [URL does not match with Proxy Rules] [ArcGIS JS API 4.12]

Question asked by RoelCalAmp on Jul 12, 2019
Latest reply on Jul 12, 2019 by rscheitlin

Basically, what I am doing it so simple, I created html page to load a web map from a portal and added the layer list widget, I have implemented security process (Proxy), I am setting the configutration to 'esri/confi' and  the proxy rules to 'esri/core/urlUtils', when I am setting this layer to visible in the view this layer is trying to use the proxy even if the url not match with the proxy rules.

 

Proxy configuration:
esriConfig.portalUrl = 'https://devgis.connect.calamp.com/portal/sharing/content/items';
esriConfig.request.proxyUrl = "https://devgis.connect.calamp.com/qa-arcgis-proxy/proxy.ashx";
urlUtils.addProxyRule({
     urlPrefix: "devgis.connect.calamp.com/server/rest/services/QA",
     proxyUrl: "https://devgis.connect.calamp.com/qa-arcgis-proxy/proxy.ashx"
});
esriConfig.request.trustedServers.push("devgis.connect.calamp.com");

Current Query: [Incorrect]
https://devgis.connect.calamp.com/qa-arcgis-proxy/proxy.ashx?http://qa.connect.calamp.com/twc/radar/2/2/1/f604af232a9a41c784af232a9a21c73f

 

Should be like this: [Correct]
http://qa.connect.calamp.com/twc/radar/2/2/1/f604af232a9a41c784af232a9a21c73f

 

Because the URL Layer does not match with the proxy rules.. I wondering if I am missing something or it is a bug in 4.x.


Please let me know if you have any idea!!

Outcomes