Basically the app will make a rest to a URL like this - http://SERVER:6080/arcgis/rest/services?token=IHFgoom_rq5DJ9lU5sXi2AWKRAuTsBMi8lhlYhdPjJI.
To get a list of services. The above works fine when I enable CORS like this beforehand:
esri.config.defaults.io.alwaysUseProxy = false;
But as soon as I change the url to the REST Admin API instead of the REST services directory i.e. http://SERVER:6080/arcgis/admin/services?token=IHFgoom_rq5DJ9lU5sXi2AWKRAuTsBMi8lhlYhdPjJI. it doesn't work and I get this:
esri.config.defaults.io.proxyUrl is not set.
Even though I've got CORS setup, so does anyone know why the ArcGIS REST services directory is different to the admin API directory when using CORS?