<?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 Cors and API 4.9 issue in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-and-api-4-9-issue/m-p/605052#M56648</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed my app's default API from 4.8 to 4.9 and am getting a CORS error when loading our layers in development mode (localhost).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our webserver is CORS enabled, and it used to work fine in 4.8. I am aware of the changes made in 4.9 regarding cors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting a 401 unauthorized error, and when adding the domain to&amp;nbsp;esriConfig.request.trustedServers (we are using web authentication), I am getting the following error :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The 'Access-Control-Allow-Origin' header contains multiple values '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A8080" rel="nofollow" target="_blank"&gt;http://localhost:8080&lt;/A&gt;&lt;SPAN&gt;, *', but only one is allowed. Origin '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A8080" rel="nofollow" target="_blank"&gt;http://localhost:8080&lt;/A&gt;&lt;SPAN&gt;' is therefore not allowed access.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I disabled&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;web security in a Chrome window, and that works fine there. It's a good enough work around, but I was wondering if there was a way to make it work in "normal" mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Oct 2018 12:30:49 GMT</pubDate>
    <dc:creator>MatthieuThery1</dc:creator>
    <dc:date>2018-10-09T12:30:49Z</dc:date>
    <item>
      <title>Cors and API 4.9 issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-and-api-4-9-issue/m-p/605052#M56648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed my app's default API from 4.8 to 4.9 and am getting a CORS error when loading our layers in development mode (localhost).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our webserver is CORS enabled, and it used to work fine in 4.8. I am aware of the changes made in 4.9 regarding cors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting a 401 unauthorized error, and when adding the domain to&amp;nbsp;esriConfig.request.trustedServers (we are using web authentication), I am getting the following error :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The 'Access-Control-Allow-Origin' header contains multiple values '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A8080" rel="nofollow" target="_blank"&gt;http://localhost:8080&lt;/A&gt;&lt;SPAN&gt;, *', but only one is allowed. Origin '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A8080" rel="nofollow" target="_blank"&gt;http://localhost:8080&lt;/A&gt;&lt;SPAN&gt;' is therefore not allowed access.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I disabled&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;web security in a Chrome window, and that works fine there. It's a good enough work around, but I was wondering if there was a way to make it work in "normal" mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2018 12:30:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-and-api-4-9-issue/m-p/605052#M56648</guid>
      <dc:creator>MatthieuThery1</dc:creator>
      <dc:date>2018-10-09T12:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cors and API 4.9 issue</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-and-api-4-9-issue/m-p/605053#M56649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matthieu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The best way to avoid this is to never use localhost (even in development). I never use localhost I always use the machine name of my development machine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2018 12:45:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-and-api-4-9-issue/m-p/605053#M56649</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-10-09T12:45:40Z</dc:date>
    </item>
  </channel>
</rss>

