<?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: CORS error when trying to access NASA layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003611#M70861</link>
    <description>&lt;P&gt;do you belong to the organization that owns that layer (NASA)?&lt;/P&gt;</description>
    <pubDate>Fri, 20 Nov 2020 19:50:31 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-11-20T19:50:31Z</dc:date>
    <item>
      <title>CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003605#M70859</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to pull a layer hosted by the nasa mapserver into my arcgis js api app.&amp;nbsp; The layer is here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer" target="_blank" rel="nofollow noopener noreferrer"&gt;https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I define the layer like this:&lt;/P&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;&lt;SPAN class="hljs-keyword"&gt;export&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;const&lt;/SPAN&gt; SC2Sept29 = &lt;SPAN class="hljs-keyword"&gt;new&lt;/SPAN&gt; MapImageLayer({
    &lt;SPAN class="hljs-attr"&gt;url&lt;/SPAN&gt;:
        &lt;SPAN class="hljs-string"&gt;'https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer/547'&lt;/SPAN&gt;,
});&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And add it to the map.&amp;nbsp; This is giving me a classic CORS error:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2" color="#FF0000"&gt;Access to fetch at '&lt;A href="https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer/547?f=json" target="_blank" rel="noopener"&gt;https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer/547?f=json&lt;/A&gt;' from origin 'http://localhost:5501' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I've done a lot of reading about CORS issues, and configuring a proxy, but I'm struggling to pull this layer in. I am not having issues with my other layers, most of which are coming directly from arcgis's own servers.&amp;nbsp; When I check the response headers for this request, there are no "Access-Control-Allow-&amp;lt;X&amp;gt;" headers.&amp;nbsp; Does this mean that this is an older server that is not configured for CORS?&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;&lt;A href="https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/working-with-proxies/" target="_self"&gt;registered my application and tried to establish a proxy for it&lt;/A&gt;&amp;nbsp;, and then use&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/guide/proxies/" target="_self"&gt;esriConfig&lt;/A&gt;&amp;nbsp;to configure my app to use it.&amp;nbsp; When I do that, the page make a request without the proxy, which throws the CORS error.&amp;nbsp; But then it makes the request again with the proxied URL:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&lt;SPAN&gt;&lt;A href="https://utility.arcgis.com/usrsvcs/appservices/LmNXFvAttVIu5FBo/rest/services/World/Utilities/GPServer/GetToolInfo/execute?https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer/547?f=json" target="_blank" rel="noopener"&gt;https://utility.arcgis.com/usrsvcs/appservices/LmNXFvAttVIu5FBo/rest/services/World/Utilities/GPServer/GetToolInfo/execute?https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer/547?f=json&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;But I'm getting a 403:forbidden error on that request.&amp;nbsp; Though I may not have configured my proxy correctly in my app.&amp;nbsp; Configuring a proxy requires that you select a service, like "Geocoding," "Routing Utilities," etc.&amp;nbsp; I tried "Routing Utilites," and "Service Area," but I'm sort of stumbling in the dark.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure if I'm going about this all wrong.&amp;nbsp; How can I get these NASA layers in my app?&amp;nbsp; I was under the assumption that NASA's layers are available for public consumption.&amp;nbsp; Is that incorrect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reading&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 19:39:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003605#M70859</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-11-20T19:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003609#M70860</link>
      <description>&lt;P&gt;does this help?&lt;/P&gt;&lt;P&gt;&lt;A href="https://enterprise.arcgis.com/en/server/latest/administer/windows/restricting-cross-domain-requests-to-arcgis-server.htm" target="_blank"&gt;https://enterprise.arcgis.com/en/server/latest/administer/windows/restricting-cross-domain-requests-to-arcgis-server.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 19:49:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003609#M70860</guid>
      <dc:creator>BillFox</dc:creator>
      <dc:date>2020-11-20T19:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003611#M70861</link>
      <description>&lt;P&gt;do you belong to the organization that owns that layer (NASA)?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 19:50:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003611#M70861</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-11-20T19:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003613#M70862</link>
      <description>&lt;P&gt;nope,&lt;/P&gt;&lt;P&gt;maybe this too&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/developers/administration/arcgis-ria-developers-tips-on-using-cross-domain-policy-files-part-1-intro/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/developers/administration/arcgis-ria-developers-tips-on-using-cross-domain-policy-files-part-1-intro/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 19:56:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003613#M70862</guid>
      <dc:creator>BillFox</dc:creator>
      <dc:date>2020-11-20T19:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003619#M70863</link>
      <description>&lt;P&gt;One big issue I see is that you are trying to access a a MapImageLayer using a map service sublayer url.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;export const SC2Sept29 = new MapImageLayer({
    url: 'https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer/547',
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;It should look like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;export const SC2Sept29 = new MapImageLayer({
    url: 'https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer',
});&lt;/LI-CODE&gt;&lt;P&gt;Notice no sublayer 547 in the url.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 20:11:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003619#M70863</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-11-20T20:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003634#M70865</link>
      <description>&lt;P&gt;Yes I am aware of that.&amp;nbsp; I was playing around with the &lt;FONT face="courier new,courier"&gt;/547&lt;/FONT&gt; at the end and happened to copy that code into this question.&amp;nbsp; I am actually using the &lt;FONT face="courier new,courier"&gt;sublayers&lt;/FONT&gt; property in my code to property target the right sublayers, I just wrote that url into this post without double checking it.&amp;nbsp; Regardless of the&lt;FONT face="courier new,courier"&gt; /id&lt;/FONT&gt;, I'm getting the CORS errors.&amp;nbsp; Thanks for pointing this out though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 21:10:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003634#M70865</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-11-20T21:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003635#M70866</link>
      <description>&lt;P&gt;I am not a member of the org that owns the layer.&amp;nbsp; So I guess my next question would be: do I need to be?&amp;nbsp; Can I not consume these layers from an external / public application?&amp;nbsp; The terms of t service of the layer say that the layer is available for "...&lt;SPAN&gt;freely available to federal, state, public, non-profit and commercial users...".&amp;nbsp; Am I interpereting that incorrectly?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 21:14:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003635#M70866</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-11-20T21:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003636#M70867</link>
      <description>&lt;P&gt;So I am not the administrator for this server / organization.&amp;nbsp; I'm not even a member.&amp;nbsp; I'm not sure if what I'm trying to do is even possible, but the solution I need would have to be entirely from the layer-consumer end, if such a solution exists.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 21:18:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003636#M70867</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-11-20T21:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003654#M70869</link>
      <description>&lt;P&gt;OK, so it is an issue which how you are proxing then. Here is my code that works fine:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8"&amp;gt;
  &amp;lt;meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"&amp;gt;
  &amp;lt;title&amp;gt;MapImageLayer - set renderers on sublayers - 4.17&amp;lt;/title&amp;gt;

  &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.17/esri/css/main.css"&amp;gt;
  &amp;lt;script src="https://js.arcgis.com/4.17/"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;style&amp;gt;
    html,
    body,
    #viewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
    }
  &amp;lt;/style&amp;gt;

  &amp;lt;script&amp;gt;
    require([
        "esri/Map",
        "esri/views/MapView",
        "esri/layers/MapImageLayer",
        "esri/core/urlUtils",
        "dojo/domReady!"
      ],
      function(
        Map, MapView, MapImageLayer, urlUtils
      ) {

        urlUtils.addProxyRule({
          urlPrefix: "maps.disasters.nasa.gov",
          proxyUrl: "proxy/proxy.ashx"
        });

        var layer = new MapImageLayer({
          url: "https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer",
          sublayers: [
          {
            id: 549
          }]
        });
        
        var map = new Map({
          basemap: "dark-gray",
          layers: [layer]
        });

        var view = new MapView({
          container: "viewDiv",
          map: map,
          zoom: 6,
          center: [-83.114, 36.921]
        });
      });
  &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Nov 2020 21:54:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003654#M70869</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-11-20T21:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003657#M70870</link>
      <description>&lt;P&gt;So this talks about including a cross-domain policy file in the root directory of the web server.&amp;nbsp; I am developing an app which runs locally with a webpack-dev-server, and which will eventually be hosted on github pages.&amp;nbsp; So I'm not really sure where a cross-domain poly file would come into play.&amp;nbsp; After seeing your linked article, I did try to&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/31602697/webpack-dev-server-cors-issue" target="_self"&gt;add cors headers to my webpack dev server&lt;/A&gt;&amp;nbsp;, but it had no effect.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 22:33:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003657#M70870</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-11-20T22:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003680#M70872</link>
      <description>&lt;P&gt;Is the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;proxy/proxy.ashx&lt;/FONT&gt; coming from the&amp;nbsp;&lt;A href="https://github.com/Esri/resource-proxy/tree/master/DotNet" target="_self"&gt;esri dotnet proxy&lt;/A&gt;?&amp;nbsp; I am not familair with .NET, php, or java.&amp;nbsp; Is it as simple as copying the files of the git repo into a directory in my project and referenceing that file?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 23:36:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003680#M70872</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-11-20T23:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003756#M70874</link>
      <description>&lt;P&gt;I am struggling to get this to work.&amp;nbsp; I have tried the DotNet and PHP proxy, but as I am not experienced in either language, I'm not sure if I'm doing it right.&amp;nbsp; My network tab shows that when attempting to retrieve the layer, it is indeed being routed through the proxy, but the response is simply the text of the proxy file itself, and I get an "&lt;SPAN&gt;Unexpected token &amp;lt; in JSON at position 0" error in my console.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Nov 2020 04:50:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003756#M70874</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-11-22T04:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003953#M70879</link>
      <description>&lt;P&gt;Seth,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Using either Proxy does not require any experience in that language. The Proxy is a already build and configurable web application. All you have to know is how to deploy a web application to your web server. If your web server is IIS then you should just stick with the .Net proxy. Look in the proxies readme.md file for how to set it up and test the proxy using the ping url.&amp;nbsp;&lt;A href="https://github.com/Esri/resource-proxy/blob/master/DotNet/README.md" target="_blank"&gt;https://github.com/Esri/resource-proxy/blob/master/DotNet/README.md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The only file you alter is the proxy.config. In there I have this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;serverUrl url="https://maps.disasters.nasa.gov" matchAll="true" /&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;In my JS Development environment I have a C:\JS_Workspace setup as a virtual directory in IIS that allows me to run any html page from that location using my development machine url or localhost inside the&amp;nbsp;C:\JS_Workspace I have the proxy folder with the proxy.ashx, proxy.config, etc. Because I have my xyz.html inside the&amp;nbsp;C:\JS_Workspace and the proxy folder is also under&amp;nbsp;C:\JS_Workspace then the code I provided earlier just works (no CORs errors).&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 14:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003953#M70879</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-11-23T14:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003964#M70880</link>
      <description>&lt;P&gt;Does this work on another dataset? I'm guessing the owners of that data have chosen to restrict it to only run on certain domains. Easy to validate if you switch out for a layer you know is public with no such restrictions.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 14:51:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003964#M70880</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-11-23T14:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003993#M70882</link>
      <description>&lt;P&gt;I'm not having issues with data / layers from other servers in the same application.&amp;nbsp; It seems to just be NASA's &lt;FONT face="courier new,courier"&gt;maps.disasters.nasa.gov&lt;/FONT&gt; server that doesn't send responses with the "&lt;SPAN&gt;Access-Control-Allow-Origin" header, hence the CORS error.&amp;nbsp; I think&amp;nbsp;RobertScheitlin__GISP is on the right track with configuring a proxy, so I'll keep trying to get that working.&amp;nbsp; Though if you've got ideas, I'm open to suggestions.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 16:01:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1003993#M70882</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-11-23T16:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1004085#M70887</link>
      <description>&lt;P&gt;Sorry to keep dragging this out.&amp;nbsp; I feel like there is a lot of assumed knowledge here and I'm trying to find my way.&amp;nbsp; I have experience setting up server-side applications with node.js, and my dev environment has always been on a mac.&amp;nbsp; Until this, I had never heard of IIS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read through those readmes thorougly, but I can't seem to connect the dots to get things to work in my local dev environment, let alone anticipate how to set it up for my target production environment.&amp;nbsp; (My intention was to simply publish my application to github pages as a static web page, but if I need to deploy a server-side app as well to use a proxy, I suppose I could deploy it on heroku or AWS).&amp;nbsp; I followed your suggestion of changing the url in the proxy.config for both the php and .net proxies, but still no change.&amp;nbsp; I am testing small snippets like the HTML you posted in VS Code with vscode&amp;nbsp;&lt;A href="https://github.com/ritwickdey/vscode-live-server" target="_self"&gt;live server&lt;/A&gt;.&amp;nbsp; My local environment for my actual application uses webpack-dev-server.&amp;nbsp; I'm at a loss for how to prepare a proxy for use with any of these environments.&amp;nbsp; I feel I'd do well if there was a nodejs version of the proxy, as then I could at least understand the proxy code and how to run it.&lt;/P&gt;&lt;P&gt;At this point I've even tried putting in &lt;A href="https://cors-anywhere.herokuapp.com/'," target="_blank" rel="noopener"&gt;https://cors-anywhere.herokuapp.com/&lt;/A&gt;&amp;nbsp;a popuplar CORS workaround, as the&amp;nbsp;&lt;SPAN&gt;proxyUrl in urlUtils.&amp;nbsp; Even with this, the response is returning the content of the proxy, not the resource I want my proxy to communicate back to my page.&amp;nbsp; You can see what I'm working with in my pratice git repo,&amp;nbsp;&lt;A href="https://github.com/slutske22/Practice_files/tree/master/ArcGIS%20API/MyMaps/california_wildfires_proxy" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp; I don't want to give up on this, but I feel there's a huge gap in documentation and I'm having a hard time agreeing with your statement that '&lt;SPAN&gt;using either proxy does not require any experience in that language.'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I appreciate your time and your knowldge.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 19:44:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1004085#M70887</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-11-23T19:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1012847#M71235</link>
      <description>&lt;P&gt;Please let me know if you have got this working, I am also facing the same issue with the proxy (jsp/php/asp) services. But I could able to make the jsp proxy working, if I deploy both application code and proxy code in same server.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 11:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1012847#M71235</guid>
      <dc:creator>kattoor</dc:creator>
      <dc:date>2020-12-30T11:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1012905#M71238</link>
      <description>&lt;P&gt;It is absolutely standard to have4 the proxy and the app on the same server. Otherwise you will continue to have cors issues.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 15:17:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1012905#M71238</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-12-30T15:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: CORS error when trying to access NASA layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1012943#M71241</link>
      <description>&lt;P&gt;I did get it working, but not with any of the proxies provided by ESRI.&amp;nbsp; I wrote my own quick nodejs server and used an instance of cors-anywhere to attach the proper cors headers.&amp;nbsp; Here's the code for that:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const express = require('express');
const cors = require('cors');
const corsAnywhere = require('cors-anywhere');
const path = require('path');

const port = process.env.PORT || 3030;
process.env.PWD = process.cwd();

var app = express();

let proxy = corsAnywhere.createServer({
	originWhitelist: [], // Allow all origins
	requireHeaders: [], // Do not require any headers.
	removeHeaders: [], // Do not remove any headers.
});

app.use(cors());

app.get('/proxy/:proxyUrl*', (req, res) =&amp;gt; {
	req.url = req.url.replace('/proxy/https:/', '/https://');
	proxy.emit('request', req, res);
});

app.use(express.static(path.join(process.env.PWD, 'dist')));

app.listen(port, () =&amp;gt; {
	console.log(`App listening on port ${port}`);
});&lt;/LI-CODE&gt;&lt;P&gt;The proxy url replace line is a little weird, you can read more about why I had to do that here:&amp;nbsp;&lt;A href="https://stackoverflow.com/a/65217801/12010984" target="_blank"&gt;https://stackoverflow.com/a/65217801/12010984&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then when I create my layer, I prefix the layer url with /proxy/, and it works.&amp;nbsp; As you can see, this same server which provides the proxy also serves the static front end files from the dist folder.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For some reason NASA returns the image responses verrryy slowly, but it does work with no CORS errors.&amp;nbsp; Hopefully that helps you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 16:42:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error-when-trying-to-access-nasa-layer/m-p/1012943#M71241</guid>
      <dc:creator>SethLutske</dc:creator>
      <dc:date>2020-12-30T16:42:13Z</dc:date>
    </item>
  </channel>
</rss>

