# CSP and CORS errors from RUM inline script implementation on Web application

**URL:** <https://community.dynatrace.com/t/csp-and-cors-errors-from-rum-inline-script-implementation-on-web-application/54193>\
**Category:** Dynatrace Managed\
**Tags:** real-user-monitoring-classic, dynatrace-managed\
**Created:** [November 25, 2025, 1:42am UTC](https://community.dynatrace.com/t/csp-and-cors-errors-from-rum-inline-script-implementation-on-web-application/54193 "2025-11-25T01:42:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![janelle](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@janelle](https://community.dynatrace.com/u/janelle)\
**Post date:** [November 25, 2025, 1:42am UTC](https://community.dynatrace.com/t/csp-and-cors-errors-from-rum-inline-script-implementation-on-web-application/54193/1 "2025-11-25T01:42:45Z")

</div>

We are running self-hosted Dynatrace Managed for my project.

We are trying to enable the Dynatrace RUM inline script in our UAT web application (placed inside the \<head\> of our login page), and we are encountering looping errors and warnings related to CSP and CORS. The error really loops non-stop.

We have also tried adding our UAT domain (e.g., https://\<my-uat-domain\>) into Dynatrace’s CORS Configuration and Allowed Origins settings, but this did not resolve the issue.

The browser console shows the following errors:

Spoiler

Access to fetch at ‘https://\<dynatrace-collector-domain\>/bf/\<id\>?type=js3…’  
from origin ‘https://\<my-uat-domain\>’ has been blocked by CORS policy:  
No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Failed to load resource: net::ERR\_FAILED

POST https://\<dynatrace-collector-domain\>/bf/\<id\>?type=js3… net::ERR\_FAILED

Has anyone encountered similar CSP or CORS issues when enabling Dynatrace RUM inline script, and is there any known workaround or configuration that can resolve it?

Thanks in advance, any help are deeply appreciated.

* * *

---

<div class="post-metadata">

**Author:** ![janelle](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@janelle](https://community.dynatrace.com/u/janelle)\
**Post date:** [November 25, 2025, 1:47am UTC](https://community.dynatrace.com/t/csp-and-cors-errors-from-rum-inline-script-implementation-on-web-application/54193/2 "2025-11-25T01:47:41Z")

</div>

Access to fetch at ‘https://\<dynatrace-collector-domain\>/bf/\<id\>?type=js3…’  
from origin ‘https://\<my-uat-domain\>’ has been blocked by CORS policy:  
No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Failed to load resource: net::ERR\_FAILED

POST https://\<dynatrace-collector-domain\>/bf/\<id\>?type=js3… net::ERR\_FAILED

_ **I re-paste the error message here again, as it is not showing properly in my first post.** _

---

<div class="post-metadata">

**Author:** ![janelle](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@janelle](https://community.dynatrace.com/u/janelle)\
**Post date:** [November 26, 2025, 3:54am UTC](https://community.dynatrace.com/t/csp-and-cors-errors-from-rum-inline-script-implementation-on-web-application/54193/3 "2025-11-26T03:54:07Z")

</div>

Hi Dynatrace folks,

I am reading through other related to CORS issue from Dynatrace, and based on this link&nbsp;[https://community.dynatrace.com/t5/Real-User-Monitoring/CORS-error-on-agentless-RUM-page-with-JavaScript-tag/m-p/164690](https://community.dynatrace.com/post/164690)  
which has something similar.

- Open DevTools → **Application** tab → Clear storage → “Clear site data” for domain
- Also in DevTools → Network → “Disable cache” checked, then refresh while DevTools is open.
- And the Errors are GONE

I did a clear storage cache, and the errors are gone. But it does not send any stats to dynatrace.&nbsp;  
We checked the inline script are correctly injected, but not working. What can the possible problem?

---

<div class="post-metadata">

**Author:** ![janelle](https://avatars.discourse-cdn.com/v4/letter/j/839c29/32.png) [@janelle](https://community.dynatrace.com/u/janelle)\
**Post date:** [December 2, 2025, 4:33am UTC](https://community.dynatrace.com/t/csp-and-cors-errors-from-rum-inline-script-implementation-on-web-application/54193/4 "2025-12-02T04:33:37Z")

</div>

@MaciejNeumann

**May I know how i can get any help?**
