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.
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.
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.
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.
We checked the inline script are correctly injected, but not working. What can the possible problem?