<?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 Is there a way to get the 3.x JS API to work with a Content-Security-Policy without the srcipt-src 'unsafe-eval' directive? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-get-the-3-x-js-api-to-work-with/m-p/593743#M55577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to get the ArcGIS JS API 3.28 to load in an environment with a Content-Security-Policy with the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;script-src 'self' 'https://js.arcgis.com/3.28' and the application will not load as it seem init.js fails the 'unsafe-eval' directive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;init.js:14 Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' https://js.arcgis.com/3.28/"&lt;/P&gt;&lt;P&gt;at new Function (&amp;lt;anonymous&amp;gt;)&lt;BR /&gt; at init.js:14&lt;BR /&gt; at init.js:38&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody else tried using the api in such an environment and had success?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Jun 2019 16:34:44 GMT</pubDate>
    <dc:creator>GeraldGayowsky</dc:creator>
    <dc:date>2019-06-11T16:34:44Z</dc:date>
    <item>
      <title>Is there a way to get the 3.x JS API to work with a Content-Security-Policy without the srcipt-src 'unsafe-eval' directive?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-get-the-3-x-js-api-to-work-with/m-p/593743#M55577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to get the ArcGIS JS API 3.28 to load in an environment with a Content-Security-Policy with the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;script-src 'self' 'https://js.arcgis.com/3.28' and the application will not load as it seem init.js fails the 'unsafe-eval' directive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;init.js:14 Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' https://js.arcgis.com/3.28/"&lt;/P&gt;&lt;P&gt;at new Function (&amp;lt;anonymous&amp;gt;)&lt;BR /&gt; at init.js:14&lt;BR /&gt; at init.js:38&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody else tried using the api in such an environment and had success?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2019 16:34:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-get-the-3-x-js-api-to-work-with/m-p/593743#M55577</guid>
      <dc:creator>GeraldGayowsky</dc:creator>
      <dc:date>2019-06-11T16:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to get the 3.x JS API to work with a Content-Security-Policy without the srcipt-src 'unsafe-eval' directive?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-get-the-3-x-js-api-to-work-with/m-p/593744#M55578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The short answer is no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error you're showing is actually a Dojo error, which you can eliminate by configuring csp-restrictions.&amp;nbsp; Unfortunately,&amp;nbsp;ArcGIS API 3.x itself contains code that will be rejected by CSP without the 'unsafe-eval' tag.&amp;nbsp; This&amp;nbsp;isn't an issue with 4.x, so unless there's 3.x functionality you really need, you should consider going that route.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this link for more info:&amp;nbsp;&lt;A href="https://community.esri.com/groups/geodev/blog/2019/09/05/content-security-policy-and-the-arcgis-api-for-javascript"&gt;https://community.esri.com/groups/geodev/blog/2019/09/05/content-security-policy-and-the-arcgis-api-for-javascript&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 20:58:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-get-the-3-x-js-api-to-work-with/m-p/593744#M55578</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2019-09-05T20:58:27Z</dc:date>
    </item>
  </channel>
</rss>

