Add From File (KML) in Add Data widget blocked by CORS - proxy not working

623
1
12-13-2019 12:04 PM
JoeRogan
New Contributor III

Hi, I am using the Add Data widget in several apps.  When adding a KML via the drop, it works in my workspace environment where I don't require a proxy to access the services.  When the app is deployed to Test/Prod environments is uses the Esri resource-proxy to access the secured services, webmap, etc.  I have rules in the proxy configured for 

https://mydomain/portal/sharing and https://mydomain/arcgis/rest/services  which works for everything except this.
.
There browser error I get looks like this:
(index):1 Access to XMLHttpRequest at 'https://mydomain/portal/sharing/kml' from origin 'https://appdomain' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
AddFromFilePane.js?wab_dv=2.10:387 Unable to load KML
.
I've narrowed this down to the widget's use / lack of use of the proxy by disabling it temporarily (and ignoring layer load errors) and it does work when deployed to those web servers.  What I don't get is that in both the working and problem environments, the requests look exactly the same in the network tab, so I'm not sure what is wrong.  Any advice?  Thanks!
0 Kudos
1 Reply
shaylavi
Esri Contributor

Sounds like it might be the security settings in Chrome. Have you tried with IE?

You can bypass Chrome security with the following command - start chrome.exe --disable-web-security

Shay
0 Kudos