<?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 Handling CORS issue while using GeoJSON layer URL in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471199#M43668</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To test an application, I created a sample GeoJSON on my AWS and passing its URL to the GeoJSON Layer JS API to access it - however I am facing CORS issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For now I am able to bypass it with disabling Chrome security, however, I wanted to know if there is any means to pass appropriate Request headers to fix this for final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;var options = {&lt;BR /&gt; query: {&lt;BR /&gt; f: "json"&lt;BR /&gt; },&lt;BR /&gt; responseType: "json",&lt;BR /&gt; mode: "no-cors"&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var options = {&lt;BR /&gt; query: {&lt;BR /&gt; f: "json"&lt;BR /&gt; },&lt;BR /&gt; responseType: "json",&lt;BR /&gt; headers: {&lt;BR /&gt; "Access-Control-Allow-Headers": "*"&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I am using&amp;nbsp;require(["esri/request"] but to no success - its still throwing the same error. What am I missing here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jul 2019 13:08:52 GMT</pubDate>
    <dc:creator>GeorgeAbraham1</dc:creator>
    <dc:date>2019-07-18T13:08:52Z</dc:date>
    <item>
      <title>Handling CORS issue while using GeoJSON layer URL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471199#M43668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To test an application, I created a sample GeoJSON on my AWS and passing its URL to the GeoJSON Layer JS API to access it - however I am facing CORS issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For now I am able to bypass it with disabling Chrome security, however, I wanted to know if there is any means to pass appropriate Request headers to fix this for final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried:&lt;/P&gt;&lt;P&gt;var options = {&lt;BR /&gt; query: {&lt;BR /&gt; f: "json"&lt;BR /&gt; },&lt;BR /&gt; responseType: "json",&lt;BR /&gt; mode: "no-cors"&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var options = {&lt;BR /&gt; query: {&lt;BR /&gt; f: "json"&lt;BR /&gt; },&lt;BR /&gt; responseType: "json",&lt;BR /&gt; headers: {&lt;BR /&gt; "Access-Control-Allow-Headers": "*"&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I am using&amp;nbsp;require(["esri/request"] but to no success - its still throwing the same error. What am I missing here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2019 13:08:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471199#M43668</guid>
      <dc:creator>GeorgeAbraham1</dc:creator>
      <dc:date>2019-07-18T13:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Handling CORS issue while using GeoJSON layer URL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471200#M43669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I even tried with&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;"Access-Control-Allow-Origin": "*" but then it gives the error "Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in preflight response."&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2019 04:53:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471200#M43669</guid>
      <dc:creator>GeorgeAbraham1</dc:creator>
      <dc:date>2019-07-19T04:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Handling CORS issue while using GeoJSON layer URL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471201#M43670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌ - Anything you could help me with?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2019 06:09:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471201#M43670</guid>
      <dc:creator>GeorgeAbraham1</dc:creator>
      <dc:date>2019-07-19T06:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Handling CORS issue while using GeoJSON layer URL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471202#M43671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Couple ideas to try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;&lt;SPAN style="color: #595959; background-color: #f8f8f8; font-weight: 300;"&gt;esriConfig.request.trustedServers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;Indicates whether cross origin requests made to the associated server should include credentials such as cookies and authorization headers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;2) CORS guide page&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/guide/cors/index.html"&gt;https://developers.arcgis.com/javascript/latest/guide/cors/index.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;3) Try using a proxy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/guide/proxies/#example%3A-server-is-not-enabled-for-cors"&gt;https://developers.arcgis.com/javascript/latest/guide/proxies/#example%3A-server-is-not-enabled-for-cors&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2019 21:06:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471202#M43671</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-07-19T21:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Handling CORS issue while using GeoJSON layer URL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471203#M43672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had gone through these links but was looking more for a sample application - anyways for now we managed to enable the service as CORS enabled, so issue resolved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2019 06:14:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/handling-cors-issue-while-using-geojson-layer-url/m-p/471203#M43672</guid>
      <dc:creator>GeorgeAbraham1</dc:creator>
      <dc:date>2019-07-23T06:14:37Z</dc:date>
    </item>
  </channel>
</rss>

