<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ArcGIS JS API: Custom build, mapserver 501 error in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/arcgis-js-api-custom-build-mapserver-501-error/m-p/238734#M1491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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:&amp;nbsp;&lt;/P&gt;&lt;P&gt;OPTIONS &lt;A href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;XMLHttpRequest cannot load &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FWorld_Street_Map%2FMapServer%3Ff%3Djson" rel="nofollow" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json&lt;/A&gt;&lt;SPAN&gt;. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A4000" rel="nofollow" target="_blank"&gt;http://localhost:4000&lt;/A&gt;&lt;SPAN&gt;' is therefore not allowed access. The response had HTTP status code 501.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the config file for my project:&lt;/P&gt;&lt;P&gt;requirejs.config({&lt;BR /&gt; paths: {&lt;BR /&gt;&lt;SPAN&gt; "jquery": '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fcode.jquery.com%2Fjquery-3.1.0.min" rel="nofollow" target="_blank"&gt;https://code.jquery.com/jquery-3.1.0.min&lt;/A&gt;&lt;SPAN&gt;',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'esri/moment': '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fmoment.js%2F2.14.1%2Fmoment" rel="nofollow" target="_blank"&gt;https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment&lt;/A&gt;&lt;SPAN&gt;',&lt;/SPAN&gt;&lt;BR /&gt; "esri": "../lib/main",&lt;BR /&gt;&lt;SPAN&gt; "dojo": '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fjs.arcgis.com%2F4.1%2Fdojo" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/4.1/dojo&lt;/A&gt;&lt;SPAN&gt;',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; "dojox": '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fjs.arcgis.com%2F4.1%2Fdojox" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/4.1/dojox&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2016 23:11:10 GMT</pubDate>
    <dc:creator>MariamDost</dc:creator>
    <dc:date>2016-10-25T23:11:10Z</dc:date>
    <item>
      <title>ArcGIS JS API: Custom build, mapserver 501 error</title>
      <link>https://community.esri.com/t5/developers-questions/arcgis-js-api-custom-build-mapserver-501-error/m-p/238734#M1491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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:&amp;nbsp;&lt;/P&gt;&lt;P&gt;OPTIONS &lt;A href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;XMLHttpRequest cannot load &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fservices.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FWorld_Street_Map%2FMapServer%3Ff%3Djson" rel="nofollow" target="_blank"&gt;http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json&lt;/A&gt;&lt;SPAN&gt;. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A4000" rel="nofollow" target="_blank"&gt;http://localhost:4000&lt;/A&gt;&lt;SPAN&gt;' is therefore not allowed access. The response had HTTP status code 501.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the config file for my project:&lt;/P&gt;&lt;P&gt;requirejs.config({&lt;BR /&gt; paths: {&lt;BR /&gt;&lt;SPAN&gt; "jquery": '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fcode.jquery.com%2Fjquery-3.1.0.min" rel="nofollow" target="_blank"&gt;https://code.jquery.com/jquery-3.1.0.min&lt;/A&gt;&lt;SPAN&gt;',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'esri/moment': '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fmoment.js%2F2.14.1%2Fmoment" rel="nofollow" target="_blank"&gt;https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment&lt;/A&gt;&lt;SPAN&gt;',&lt;/SPAN&gt;&lt;BR /&gt; "esri": "../lib/main",&lt;BR /&gt;&lt;SPAN&gt; "dojo": '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fjs.arcgis.com%2F4.1%2Fdojo" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/4.1/dojo&lt;/A&gt;&lt;SPAN&gt;',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; "dojox": '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fjs.arcgis.com%2F4.1%2Fdojox" rel="nofollow" target="_blank"&gt;http://js.arcgis.com/4.1/dojox&lt;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 23:11:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcgis-js-api-custom-build-mapserver-501-error/m-p/238734#M1491</guid>
      <dc:creator>MariamDost</dc:creator>
      <dc:date>2016-10-25T23:11:10Z</dc:date>
    </item>
  </channel>
</rss>

