american_data

Option to Disable CORS or Use withCredentials

Discussion created by american_data on Jul 1, 2013
Latest reply on Jul 10, 2013 by terry.sherman
Currently we cannot use the last 3 versions of ArcGIS for Javascript because authentication cookies are not sent with CORS requests.

I have a couple of ideas to request as a solution:

1) Give us a global configuration option to enable/disable CORS
esri.config.defaults.io.enableCors = true | false;


2) Allow us to include credentials in request via esri.setRequestPreCallback

esri.setRequestPreCallback(function (ioArgs) {
    ioArgs.withCredentials = (shouldUseCredentials(ioArgs.url) === true);
    return ioArgs;
});


If something like this already present and I missed it, my mistake.  Please lead me in the right direction.

Outcomes