Select to view content in your preferred language

Request: Add Ability to Change Proxy Url Per-Request

529
1
06-28-2013 01:05 PM
AmericanData
Deactivated User
We've been a customer of ESRI for several years and have grown with ArcGIS web technology as it progressed.  In the past, we used Silverlight.  And one of the best blogs about ArcGIS for Silverlight was that ability to get passed the two-request limit of browsers by using multiple subdomains:

http://blogs.esri.com/esri/arcgis/2009/12/10/using-multiple-subdomains-with-a-tiled-service-layer/

Well we surpassed Silverlight for a couple of years now but enjoyed this feature as it increased our map performance.  So we did the same thing with ArcGIS for JS by modifying wrapping the esri._getProxyUrl method.

As of 3.3, we cannot override this method as it is encapsulated -- a good thing in most ways.  Could you either re-expose this function or allow a callback similar to esri.setRequestPreCallback?

We're pretty much stuck on 3.2 until this changes.  We tried to use CORS and addProxyRule, but cookies are not sent through to those requests -- which makes sense actually.

Our only other option is to host ArcGIS for JS locally and manipulate _getProxyUrl then.  We would rather not as that is a headache to maintain.  And I do know that sometimes you patch an existing version after it is released.
0 Kudos
1 Reply
AmericanData
Deactivated User
By the way, we cannot derive from the tiled layer class either.  Because the proxy uses the question mark + url:

Ex.

http://subdomain1.mydomain.com/proxy.axd?http://internalserver/arcgis/rest/services/mylayer/mapserver


And if you put this in your layer's url, it turns out to be something like this:

http://subdomain1.mydomain.com/proxy.axd?f=json&http://internalserver/arcgis/rest/services/mylayer/mapserver


or worse

http://subdomain1.mydomain.com/proxy.axd?f=json&objectids=&abunchofothertags=&http://internalserver/arcgis/rest/services/mylayer/mapserver/0


In a way I probably could piecemeal the real request from this.  But as you can see this could get really ugly and broken quickly.  All I need is a way to alter the url right before it is used.
0 Kudos