JS API 3.7, proxy.ashx fails for requests with content-encoding: gzip

484
0
07-21-2021 07:31 AM
danbecker
Occasional Contributor III

3.7 web app that's been running for a few years now, just recently started having issues with the proxy.ashx. We have the latest .net proxy installed, ver 1.1.2, app/proxy both hosted on IIS 8.5. This is also the same machine running portal/server web adaptors.

When the app starts loading feature tables, the below request fails with: net::ERR_CONTENT_DECODING_FAILED 200 (OK)

https://app.ourdomain.com/proxy/proxy.ashx?https://gis.ourdomain.com/server/rest/services/Hosted/ReviewerDB2/FeatureServer/0/query?f=json&returnIdsOnly=true&token=1...

response_headers.png

 

 

 

 

 

If I try the request without going through the proxy, everything works as-expected. So ArcGIS server and the hosted datastore are all operating normally. The ArcGIS server logs also display nothing.

Other requests through the proxy and have no issues, like below.

https://app.ourdomain.com/proxy/proxy.ashx?https://gis.ourdomain.com/server/rest/services/Hosted/Rev...

response_headers.png

 

 

 

 

One last test was to comment out the proxy config from the JS web app

 

 

//esriConfig.defaults.io.proxyUrl = "/proxy/proxy.ashx"
//esriConfig.defaults.io.alwaysUseProxy = true;

 

 

 

 Then "enable" CORS with JS API 3.7 via unsafe-eval.

 

 

 

<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-eval' https://js.arcgis.com; object-src 'self'">

 

 

 

Everything then works as-expected, but our customer will never be able to visit a site with unsafe-eval in the header.

Any advice here? What is all of a sudden going on with our .ashx proxy? .net Windows updates? IIS 8 updates?

0 Kudos
0 Replies