<?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: Client side fetching of external resources without app functions in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285988#M1544</link>
    <description>&lt;P&gt;Hi Julius!&lt;/P&gt;
&lt;P&gt;Unfortunately, as of now this is not supported and is only possible to have a single&amp;nbsp;&lt;EM&gt;main.js&lt;/EM&gt; file. Hacking around it using the &lt;EM&gt;assets&lt;/EM&gt; subfolder is the only way but as you mentioned that's not working for you.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Sep 2025 09:52:50 GMT</pubDate>
    <dc:creator>dani_coll</dc:creator>
    <dc:date>2025-09-15T09:52:50Z</dc:date>
    <item>
      <title>Client side fetching of external resources without app functions</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285634#M1530</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;I would like to ask a question about the limitations of the dynatrace app with the external requests.&lt;BR /&gt;I have read the documentation on how to fetch data from external resources using app functions, but it looks like I can't use this approach for my project.&lt;BR /&gt;I would like show a map in my dynatrace app using mapbox api based on data (coordinates) from our dynatrace events.&lt;BR /&gt;Mapbox provides a client-side JavaScript library, that manages all the network communication to their apis, and uses an element from the page document, to render the map. -&amp;gt;&amp;nbsp;&lt;A href="https://docs.mapbox.com/mapbox-gl-js/guides" target="_blank" rel="noopener"&gt;https://docs.mapbox.com/mapbox-gl-js/guides&lt;/A&gt;&lt;BR /&gt;From what I've read so far, the function that renders the map doesn't have a way to extract fetching of the resources outside, and needs to have access to the web page document, therefore I can't use the app function.&lt;BR /&gt;So I would like to ask, is there a way, how to configure the dynatrace app so that so it can fetch resources from external domains?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2025 14:20:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285634#M1530</guid>
      <dc:creator>Patrik_Potančok</dc:creator>
      <dc:date>2025-09-09T14:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Client side fetching of external resources without app functions</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285694#M1531</link>
      <description>&lt;P&gt;Hi Patrik,&lt;/P&gt;
&lt;P&gt;It's possible! You can use the &lt;STRONG&gt;csp&lt;/STRONG&gt;&amp;nbsp;attribute on your &lt;STRONG&gt;app.config.json&lt;/STRONG&gt; like this&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
  "environmentUrl": "&amp;lt;Your-Environment-URL&amp;gt;",
  "app": {
    "id": "&amp;lt;Your-App-ID&amp;gt;",
    "name": "&amp;lt;Your-App-Name&amp;gt;",
    "version": "0.0.0",
    "description": "&amp;lt;Your-App-Description&amp;gt;",
    "scopes": [],
    "csp": {
      "img-src": [
        {
          "value": "https://awesome-cdn.net",
          "comment": "allows to load images from awesome CDN"
        }
      ],
      "font-src": [
        {
          "value": "https://font-paradise.com",
          "comment": "allows to load fonts from font paradise"
        }
      ]
    }
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find more information &lt;A href="https://developer.dynatrace.com/develop/security/configure-csp-rules/" target="_blank"&gt;here&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 13:06:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285694#M1531</guid>
      <dc:creator>dani_coll</dc:creator>
      <dc:date>2025-09-10T13:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Client side fetching of external resources without app functions</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285801#M1534</link>
      <description>&lt;P&gt;As an alternative to using Mapbox, check out strato-geo: &lt;A href="https://developer.dynatrace.com/design/geo/" target="_blank"&gt;https://developer.dynatrace.com/design/geo/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 14:44:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285801#M1534</guid>
      <dc:creator>doesterr</dc:creator>
      <dc:date>2025-09-11T14:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Client side fetching of external resources without app functions</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285809#M1535</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/89527"&gt;@doesterr&lt;/a&gt;&amp;nbsp;, the provided geo components do not provide the required detail, such as cities or streets, we need to have much more detail on maps in this particular case. This option has been explored already, and the customer has a mapbox subscription.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 15:06:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285809#M1535</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2025-09-11T15:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Client side fetching of external resources without app functions</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285810#M1536</link>
      <description>&lt;P&gt;Makes sense, thanks for sharing!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 15:08:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285810#M1536</guid>
      <dc:creator>doesterr</dc:creator>
      <dc:date>2025-09-11T15:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Client side fetching of external resources without app functions</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285811#M1537</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/54539"&gt;@dani_coll&lt;/a&gt;&amp;nbsp; we are also exploring the option to catch the fetch requests instread:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// sw.js
self.addEventListener('fetch', (event) =&amp;gt; {
  const url = new URL(event.request.url);

  // Example: reroute Mapbox requests through your backend
  const mapboxHosts = ['api.mapbox.com', 'events.mapbox.com', 'tiles.mapbox.com'];
  if (mapboxHosts.includes(url.hostname)) {
    const proxy = new URL('/proxy', self.location.origin);
    proxy.searchParams.set('u', event.request.url); // original URL encoded
    event.respondWith(fetch(proxy, {
      method: event.request.method,
      headers: event.request.headers,
      body: event.request.method !== 'GET' &amp;amp;&amp;amp; event.request.method !== 'HEAD'
        ? event.request.blob()
        : undefined,
      // credentials behavior mirrors the original by default
    }));
    return;
  }

  // Default pass-through
  event.respondWith(fetch(event.request));
});&lt;/LI-CODE&gt;&lt;P&gt;However we could not get this to work.&amp;nbsp;&lt;SPAN&gt;We are trying to implement a service worker in an appengine app.&amp;nbsp;We are having problems with including a service worker javascript implementation with the app bundle at the same directory level as is the compiled main.js file.&amp;nbsp;What we have achieved is service worker javascript deployment in the assets subdirectory.&amp;nbsp;This is not sufficient since the service worker is not able to intercept certain events from main.js when deployed in a subdirectory - to intercept them the implementation of the service worker must be in the same directory as main.js.&amp;nbsp;How can we configure the app build so that it includes a javascript file in the same directory as main.js in the final deployment structure?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 15:08:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285811#M1537</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2025-09-11T15:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Client side fetching of external resources without app functions</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285988#M1544</link>
      <description>&lt;P&gt;Hi Julius!&lt;/P&gt;
&lt;P&gt;Unfortunately, as of now this is not supported and is only possible to have a single&amp;nbsp;&lt;EM&gt;main.js&lt;/EM&gt; file. Hacking around it using the &lt;EM&gt;assets&lt;/EM&gt; subfolder is the only way but as you mentioned that's not working for you.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 09:52:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Client-side-fetching-of-external-resources-without-app-functions/m-p/285988#M1544</guid>
      <dc:creator>dani_coll</dc:creator>
      <dc:date>2025-09-15T09:52:50Z</dc:date>
    </item>
  </channel>
</rss>

