ArcGIS JS API: Custom build, mapserver 501 error

10-25-2016 04:11 PM
New Contributor

I followed the instructions to create a local copy of the arcgis js api 4.1. When I run my project I get a CORs error saying: 


XMLHttpRequest cannot load Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4000' is therefore not allowed access. The response had HTTP status code 501.

This error is odd b/c the API should not make preflighted (options) request to this url, it should make a get request (originally thats what it does). I have tried all the esri/config options to disable the cors but nothing seems to work. It doesn't load the map tiles. Anyone know how I can fix this?

Below is the config file for my project:

paths: {
"jquery": '',
'esri/moment': '',
"esri": "../lib/main",
"dojo": '',
"dojox": ''




Tags (1)
0 Kudos
0 Replies