<?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: Multiple 'Access-Control-Allow-Origin' headers preventing data viewing in Hub in ArcGIS Hub Questions</title>
    <link>https://community.esri.com/t5/arcgis-hub-questions/multiple-access-control-allow-origin-headers/m-p/248149#M1249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We got this one sorted out.&amp;nbsp; Somewhere on the web server there was a Web.config file that was adding the "*".&amp;nbsp; I couldn't see it due to our corporate policies but the relevant portion of the configuration file would look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #333333; background-color: #f5f5f5; border: 1px solid rgba(0, 0, 0, 0.15); margin: 0px 0px 10px; padding: 9.5px;"&gt;&amp;lt;system.webServer&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;httpProtocol&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customHeaders&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name="Access-Control-Allow-Origin" value="*" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customHeaders&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/httpProtocol&amp;gt;&amp;nbsp; &amp;lt;/system.webServer&amp;gt;&lt;/PRE&gt;&lt;P&gt;Check your web server configuration to see where this header is being added.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2018 14:44:05 GMT</pubDate>
    <dc:creator>GJY</dc:creator>
    <dc:date>2018-07-09T14:44:05Z</dc:date>
    <item>
      <title>Multiple 'Access-Control-Allow-Origin' headers preventing data viewing in Hub</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/multiple-access-control-allow-origin-headers/m-p/248147#M1247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My organization is currently exploring ArcGIS Hub.&amp;nbsp; We have a number of AGS map services which we are trying to view through Hub.&amp;nbsp; We are getting this error in the Data tab:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="405307" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/405307_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;I have determined that this is a direct result of a browser CORS error (multiple 'Access-Control-Allow-Origin' headers).&amp;nbsp; Here is the error (Urls are not real):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Failed to load &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/org.com/arcgis/rest/info?f=json:" rel="nofollow" target="_blank"&gt;https://org.com/arcgis/rest/info?f=json:&lt;/A&gt;&lt;SPAN&gt; The 'Access-Control-Allow-Origin' header contains multiple values '&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/opendata-org.opendata.arcgis.com" rel="nofollow" target="_blank"&gt;https://opendata-org.opendata.arcgis.com&lt;/A&gt;&lt;SPAN&gt;, *', but only one is allowed. Origin '&lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/opendata-org.opendata.arcgis.com" rel="nofollow" target="_blank"&gt;https://opendata-org.opendata.arcgis.com&lt;/A&gt;&lt;SPAN&gt;' is therefore not allowed access."&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I strip the extra header using a Fiddler script, the problem goes away.&amp;nbsp; I have encountered this error before using the JavaScript API and usually it has no impact.&amp;nbsp; It seems that Hub requires the results of the '&lt;SPAN&gt;&lt;A _jive_internal="true" href="https://community.esri.com/https:" rel="nofollow" target="_blank"&gt;https://&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;org.com&lt;/SPAN&gt;&lt;SPAN&gt;/arcgis/rest/info?f=json' query to function properly.&amp;nbsp; Is there a way to add trusted servers to the Hub site configuration to avoid CORS errors?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 14:32:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/multiple-access-control-allow-origin-headers/m-p/248147#M1247</guid>
      <dc:creator>GJY</dc:creator>
      <dc:date>2018-04-30T14:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple 'Access-Control-Allow-Origin' headers preventing data viewing in Hub</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/multiple-access-control-allow-origin-headers/m-p/248148#M1248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, don't have an answer, but we're getting the same error with AGO layers. This only recently started up though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2018 14:06:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/multiple-access-control-allow-origin-headers/m-p/248148#M1248</guid>
      <dc:creator>ER_Michigan</dc:creator>
      <dc:date>2018-07-06T14:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple 'Access-Control-Allow-Origin' headers preventing data viewing in Hub</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/multiple-access-control-allow-origin-headers/m-p/248149#M1249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We got this one sorted out.&amp;nbsp; Somewhere on the web server there was a Web.config file that was adding the "*".&amp;nbsp; I couldn't see it due to our corporate policies but the relevant portion of the configuration file would look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #333333; background-color: #f5f5f5; border: 1px solid rgba(0, 0, 0, 0.15); margin: 0px 0px 10px; padding: 9.5px;"&gt;&amp;lt;system.webServer&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;httpProtocol&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customHeaders&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name="Access-Control-Allow-Origin" value="*" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customHeaders&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/httpProtocol&amp;gt;&amp;nbsp; &amp;lt;/system.webServer&amp;gt;&lt;/PRE&gt;&lt;P&gt;Check your web server configuration to see where this header is being added.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2018 14:44:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/multiple-access-control-allow-origin-headers/m-p/248149#M1249</guid>
      <dc:creator>GJY</dc:creator>
      <dc:date>2018-07-09T14:44:05Z</dc:date>
    </item>
  </channel>
</rss>

