<?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: Proxy and CORS in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342313#M31652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For the Record, I had only FireFox with this problem (IE and Chrome were fine) and using the Proxy per the ESRI link and per my posts above has indeed fixed the issue for FireFox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;@Koder303: Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2014 10:47:26 GMT</pubDate>
    <dc:creator>IrfanClemson</dc:creator>
    <dc:date>2014-06-05T10:47:26Z</dc:date>
    <item>
      <title>Proxy and CORS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342308#M31647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have established my proxy and have everything running through it on my JS site. Everything seems to be fine in IE but Firefox and Chrome disagree. I am unable to do anything in the map if I am using FF or Chrome. Having gone into dev tools, I see that I get an error "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at &amp;lt;proxy location&amp;gt;.ashx?&amp;lt;web service url&amp;gt; This can be fixed by moving the resource to the same domain or enabling CORS."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is, how do you enable CORS? I have added the clause as per &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://enable-cors.org/server_iis7.html" rel="nofollow" target="_blank"&gt;here&lt;/A&gt;&lt;SPAN&gt; into my .ashx (proxy) web.config but still no luck. Anything else I am missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jun 2014 14:05:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342308#M31647</guid>
      <dc:creator>AlexeiB</dc:creator>
      <dc:date>2014-06-03T14:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proxy and CORS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342309#M31648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am in the same boat--a&amp;nbsp; FindTask request fails on non-IE browsers if the index.html or index.aspx files are hosted on the same web server which is hosting the ESRI ArcGIS Server; otherwise, if the files are hosted on my workstation's web server then no problem. I have placed a crossdomain.xml file in the root of the remote web server as well as place a web.config file next to the html/aspx files but still no avail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI has this: &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/exp_cors_buffer.html"&gt;https://developers.arcgis.com/javascript/jssamples/exp_cors_buffer.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but I think this is too complicated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 11:32:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342309#M31648</guid>
      <dc:creator>IrfanClemson</dc:creator>
      <dc:date>2014-06-04T11:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proxy and CORS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342310#M31649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I solved my issue and this may help you as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, I had my services running on &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://abc.xyz.com" rel="nofollow" target="_blank"&gt;http://abc.xyz.com&lt;/A&gt;&lt;SPAN&gt; and I was accessing them from &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://def.hij.com" rel="nofollow" target="_blank"&gt;http://def.hij.com&lt;/A&gt;&lt;SPAN&gt;. I installed the proxy and was trying to figure out why it wasn't working. It turns out the proxy was located on &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://abc.xyz.com" rel="nofollow" target="_blank"&gt;http://abc.xyz.com&lt;/A&gt;&lt;SPAN&gt; and NOT on &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://def.hij.com" rel="nofollow" target="_blank"&gt;http://def.hij.com&lt;/A&gt;&lt;SPAN&gt;. This obviously is an issue because my hij.com is trying to access a resource located on xyz.com which is a cross origin violation. I moved the proxy to def.hij.com and the problem was solved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alex&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 20:19:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342310#M31649</guid>
      <dc:creator>AlexeiB</dc:creator>
      <dc:date>2014-06-04T20:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proxy and CORS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342311#M31650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@Koder303,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Glad you got it working!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's not working for me using proxy. Here is my config:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Index.aspx file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;require(["esri/config"], function(esriConfig) { 
 
 esriConfig.defaults.io.proxyUrl = "proxy.ashx"
&amp;nbsp;&amp;nbsp;&amp;nbsp; esriConfig.defaults.io.alwaysUseProxy = true;
 
 });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Proxy.ashx: Leave everything default.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Proxy.config file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;ProxyConfig allowedReferers="*" mustMatch="true"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serverUrls&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;serverUrl url="http://services.arcgisonline.com" matchAll="true"/&amp;gt;
&amp;nbsp; &amp;lt;serverUrl url="http://RemoteIP" matchAll="true"/&amp;gt;
&amp;nbsp; &amp;lt;serverUrl url="http://RemoteIP:6080" matchAll="true"/&amp;gt;
&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/serverUrls&amp;gt;
&amp;lt;/ProxyConfig&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These work fine when I do &lt;/SPAN&gt;&lt;A href="http://localhost/index.aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;http://localhost/index.aspx&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, after copying the files the remote server and doing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://RemoteIP/index.aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;http://RemoteIP/index.aspx&lt;/A&gt;&lt;SPAN&gt; FireFox still shows the 'Cross Origin Request Block' error when accessing the url from my local workstation browser.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my first time with Proxies. What am I missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:09:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342311#M31650</guid>
      <dc:creator>IrfanClemson</dc:creator>
      <dc:date>2021-12-11T16:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proxy and CORS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342312#M31651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh, wait--it is working now! Will confirm soon. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 10:31:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342312#M31651</guid>
      <dc:creator>IrfanClemson</dc:creator>
      <dc:date>2014-06-05T10:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proxy and CORS</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342313#M31652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For the Record, I had only FireFox with this problem (IE and Chrome were fine) and using the Proxy per the ESRI link and per my posts above has indeed fixed the issue for FireFox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;@Koder303: Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 10:47:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/proxy-and-cors/m-p/342313#M31652</guid>
      <dc:creator>IrfanClemson</dc:creator>
      <dc:date>2014-06-05T10:47:26Z</dc:date>
    </item>
  </channel>
</rss>

