2

I have a problem with Cross-Origin-Requests invoked by the ArcGIS Javascript API.

I'm able to access my web app without any issues if I use localhost:8080. But a REST call (by the ArcGIS JS API) fails if I use mymachine.local.

The exportImage REST call works properly but the query REST call invoked by featureLayer.selectFeatures fails with a Not allowed by Access-Control-Allow-Origin error.

I've gone through http://blogs.esri.com/esri/arcgis/2011/09/29/cross-origin-resource-sharing-cors-with-the-arcgis-api-for-javascript/ but I don't think there's a problem with the CORS setup as one request goes through and the other one fails.

asked Mar 11, 2013 at 16:06

1 Answer 1

2

Images are allowed in cross-domain requests, as are some other types of resource. You can read some of the limitations and reasons behind them here

answered Mar 11, 2013 at 16:15
1
  • Okay. Everything works fine in IE 9 as well as Firefox. Only chrome doesn't let the query request through. Commented Mar 12, 2013 at 7:16

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.