We are setting up an web based application (www.foobar.net) with Agentless real user monitoring, by manual insertion of the JavaScript tag. The website is public (external facing). A static landing page (www.foobar.net/some/testpage) is used to test. It contains a few third party references.
Verifying the working of the page and data collection we see the complete javascript being pulled correctly. (Using Edge browser, developer mode (F12))
A first xhr request to the public endpoint also completes.
A second xhr request fails with a CORS error, with detail “Cross-origin resource sharing error: missingAllowOriginHeader”
Question is what causes the CORS error, and more importantly what can be done to solve it?
It appears that only the 1st party data is received. The app manager tried with settings like "Access-Control-Allow-Origin: *’ with no success.
Details from F12 on the error line show:
- Request URL: https://cag.foobar.net/bf/***rest***
- Referrer Policy:strict-origin-when-cross-origin
From the page CORS Amazon S3 | Dynatrace Help (Set up CORS on Amazon S3 — Dynatrace Docs) I learned that “Unfortunately Internet Explorer 11 and Edge don’t currently support the crossorigin attribute.” So I checked with Firefox, and there the issue seems not to appear. (Chrome has same result as Edge)
Note: The Cluster Activate URL is set to a public URL (eg. cag.foobar.net:443), serviced by a load-balancer and forwarded to two CAGs (in DMZ).
The option Add the crossorigin=anonymous attribute to capture JavaScript error messages and W3C resource timings of the JavaScript tag has been enabled, resulting in the extra parameter crossorigin=“anonymous”
