<?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 CSP requires unsafe-inline in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/csp-requires-unsafe-inline/m-p/1696036#M88358</link>
    <description>&lt;P&gt;Echoing this other post:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/remove-styleapplyer-to-meet-content-security/idi-p/1601812" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/remove-styleapplyer-to-meet-content-security/idi-p/1601812&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The documentation here suggests that only script-src: 'wasm-unsafe-eval' and worker-src: blob: are required for the maps sdk to work:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/faq/#does-the-prod_name_long-support-all-content-security-policy-csp-directives" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/faq/#does-the-prod_name_long-support-all-content-security-policy-csp-directives&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, in practice we find that if we set style-src without 'unsafe-inline', SceneViews do not work.&lt;/P&gt;&lt;P&gt;See a minimal repro in this sandbox:&amp;nbsp;&lt;A href="https://codesandbox.io/p/sandbox/arcgis-csp-repro-4ndd2z" target="_blank" rel="noopener"&gt;https://codesandbox.io/p/sandbox/arcgis-csp-repro-4ndd2z&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It isn't configured correctly so the auto starting task crashes, but you can run it with the following steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open a new terminal&lt;/LI&gt;&lt;LI&gt;npm install&lt;/LI&gt;&lt;LI&gt;npm run dev&lt;/LI&gt;&lt;LI&gt;Pop out the preview in a new window&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Note that the scene seems to load but a bunch of things don't work properly within the SceneView&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Apr 2026 05:51:21 GMT</pubDate>
    <dc:creator>urbanmyth</dc:creator>
    <dc:date>2026-04-14T05:51:21Z</dc:date>
    <item>
      <title>CSP requires unsafe-inline</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/csp-requires-unsafe-inline/m-p/1696036#M88358</link>
      <description>&lt;P&gt;Echoing this other post:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/remove-styleapplyer-to-meet-content-security/idi-p/1601812" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-ideas/remove-styleapplyer-to-meet-content-security/idi-p/1601812&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The documentation here suggests that only script-src: 'wasm-unsafe-eval' and worker-src: blob: are required for the maps sdk to work:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/faq/#does-the-prod_name_long-support-all-content-security-policy-csp-directives" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/faq/#does-the-prod_name_long-support-all-content-security-policy-csp-directives&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, in practice we find that if we set style-src without 'unsafe-inline', SceneViews do not work.&lt;/P&gt;&lt;P&gt;See a minimal repro in this sandbox:&amp;nbsp;&lt;A href="https://codesandbox.io/p/sandbox/arcgis-csp-repro-4ndd2z" target="_blank" rel="noopener"&gt;https://codesandbox.io/p/sandbox/arcgis-csp-repro-4ndd2z&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It isn't configured correctly so the auto starting task crashes, but you can run it with the following steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open a new terminal&lt;/LI&gt;&lt;LI&gt;npm install&lt;/LI&gt;&lt;LI&gt;npm run dev&lt;/LI&gt;&lt;LI&gt;Pop out the preview in a new window&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Note that the scene seems to load but a bunch of things don't work properly within the SceneView&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2026 05:51:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/csp-requires-unsafe-inline/m-p/1696036#M88358</guid>
      <dc:creator>urbanmyth</dc:creator>
      <dc:date>2026-04-14T05:51:21Z</dc:date>
    </item>
  </channel>
</rss>

