I'm trying to call esri/request on a page that requires username/password, but when I do, I get the following error:
esri.config.defaults.io.proxyUrl is not set. If making a request to a CORS enabled server, please push the domain into esri.config.defaults.io.corsEnabledServers
Error: "Unable to load https://<myserver> status: 0"
But if I do add the domain into corsEnabledServers, I get this error:
XMLHttpRequest cannot load https://<myserver>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 401.
Error: Unable to load https://<myserver>' status: 0
Any ideas?