<?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 Re: Got CORS error accessing services.arcgisonline.com from localhost (debugging locally) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/got-cors-error-accessing-services-arcgisonline-com/m-p/1274703#M80722</link>
    <description>&lt;P&gt;Above workaround works... but the root cause may be due to the web server redirecting https to http. Make sure that webserver on which the web map runs does not do this. Http seems to lead to cors error.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2023 14:40:58 GMT</pubDate>
    <dc:creator>Gurunara</dc:creator>
    <dc:date>2023-04-03T14:40:58Z</dc:date>
    <item>
      <title>Got CORS error accessing services.arcgisonline.com from localhost (debugging locally)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/got-cors-error-accessing-services-arcgisonline-com/m-p/1230433#M79286</link>
      <description>&lt;P&gt;Got CORS error accessing services.arcgisonline.com from localhost (debugging locally). This was happening with just referencing basemaps, which are apparently linking to services.arcgisonline.com.&lt;/P&gt;&lt;P&gt;Current js library version is&amp;nbsp;js.arcgis.com/3.41.&lt;/P&gt;&lt;P&gt;Using workaround during map initialization, which seems to work:&lt;/P&gt;&lt;P&gt;if (esri.config.defaults.io.corsEnabledServers.indexOf('services.arcgisonline.com') !== -1)&lt;BR /&gt;esri.config.defaults.io.corsEnabledServers.splice(esri.config.defaults.io.corsEnabledServers.indexOf('services.arcgisonline.com'), 1);&lt;BR /&gt;&lt;BR /&gt;which basically removes 'services.arcgisonline.com' from the&amp;nbsp;esri.config.defaults.io.corsEnabledServers array.&lt;/P&gt;&lt;P&gt;But is there a standard way of preventing this cors error?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 17:37:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/got-cors-error-accessing-services-arcgisonline-com/m-p/1230433#M79286</guid>
      <dc:creator>Gurunara</dc:creator>
      <dc:date>2022-11-10T17:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Got CORS error accessing services.arcgisonline.com from localhost (debugging locally)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/got-cors-error-accessing-services-arcgisonline-com/m-p/1274703#M80722</link>
      <description>&lt;P&gt;Above workaround works... but the root cause may be due to the web server redirecting https to http. Make sure that webserver on which the web map runs does not do this. Http seems to lead to cors error.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 14:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/got-cors-error-accessing-services-arcgisonline-com/m-p/1274703#M80722</guid>
      <dc:creator>Gurunara</dc:creator>
      <dc:date>2023-04-03T14:40:58Z</dc:date>
    </item>
  </channel>
</rss>

