Select to view content in your preferred language

Proxy specific map services instead of all map services

831
1
03-19-2012 03:10 PM
DanielLi
Emerging Contributor
For my map viewer, I am using a proxy page with token authentication. When I set "alwaysUseProxy=true", every time i add a map service as a new layer to my base map, the proxy page is called. Is there a way to proxy specific map services instead of all of them?

Here is a scenario: if I want my base map to use a map service from my ArcGIS server, then my map viewer should call the proxy page to retrieve a token so it can display the base map. Then I want to add a layer using a map service from ArcGISOnline. During this event, I do not want the proxy page to get called. After that, I want to add another layer using a map service from my ArcGIS server. This means that the proxy should get called again to retrieve another token.

Please let me know if this is possible.
0 Kudos
1 Reply
nicogis
MVP Alum
your services pass to proxy ( esri.config.defaults.io.alwaysUseProxy = true; it is need if you have service protect) but in proxy you decide what do you want to do (if service isn't protect you don't need ask a token).
0 Kudos