AnsweredAssumed Answered

Proxy not being used correctly when service layer made visible  ie MapServer/export?

Question asked by flspat on Sep 11, 2018
Latest reply on Sep 11, 2018 by flspat

Hi All

I have a WAB 2.7 app (self deployed) that accesses a webmap with a secured arcgis server token service.  The webamp will load correctly but the secure layer won't draw.  Watching the network traffic, this makes sense b/c the 'export' image request to the service is NOT routed via the proxy.

 

Setup and things I can confirm:

  1. The proxy is correctly setup and configured:
    1. loclahost/proxy.ashx?ping returns the expected json response
    2. localhost/proxy.ashx?https://myserver/myservice/.... all return the correct response when I manually copy/paste the requests to the browser bar
  2. The WAB app config file has at least some of the config correct.  I'm using the "rules" section for the specific secure service url.  Without the rule for the specific secure service, the login/token prompt is displayed.  With the rule in place the login dialog does NOT appear and watching the network traffic, I see a bunch of /info?=json requests for the service routed via the proxy. Config:

 

"httpProxy": {
        "alwaysUseProxy": false,
        "url": "http://localhost/proxy.ashx",
        "useProxy": true,
            "rules": [
                {
                    "urlPrefix": "https://streams.whitestar.com/arcgis/rest/services",
                    "proxyUrl": "http://localhost/proxy.ashx"
                }
            ]
    },

 

Network details

The WAB correctly uses the proxy when the webmap is loading and getting service/layer info.  These request all return 200 success and the JSON is visible in the response preview:

 

locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer?f=json
locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/layers?f=json
locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/0?f=json
locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/1?f=json
locallhost/proxy.ashx?https://streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/2?f=json

 

The the layer list checkbox is clicked on, the following requests to export function are not routed thru the proxy and return the "token required" json instead of an image:

 

streams.whitestar.com/arcgis/rest/services/omnitrax/WS_Parcels_OMNITRAX/MapServer/export?dpi=96&transparent=true&format=png32&layers=show%3A0%2C1%2C2&bbox=-15859205.762025328%2C3291557.064882444%2C-6735682.065909116%2C7826413.078984177&bboxSR=102100&imageSR=102100&size=1865%2C927&f=image

 

 

What am missing?

Thanks

Outcomes