Web.dev reports a CORS error

Access to XMLHttpRequest at 'https://cloudflareinsights.com/cdn-cgi/rum' from origin 'https://static.go4webdev.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

How to fix?

https://static.go4webdev.org

My browser consol reports an error:

Access to XMLHttpRequest at 'https://cloudflareinsights.com/cdn-cgi/rum' from origin 'https://static.go4webdev.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. cloudflareinsights.com/cdn-cgi/rum:1 Failed to load resource: net::ERR_FAILED

“rum” means “Real User Metrics”

Where can I turn this RUM off? I have turned “Browser Insights” off

This looks odd - I am checking internally on this

Yes. But the ERROR went away when adding the JS Snippet for go4webdev.org. It seems that this snippet contains CORS info?

Can you clarify what configuration you had before (when it was erroring) vs now?

Somewhat odd and not that easy to explain.

  1. Domain 1 > Web Analytics (gowebstatic.tk with JS Snippet)
  2. Pointed Domain 1 to Domain 2 (go4webdev.org) without Web Analytics and no JS Snippet.
  3. Deleted Domain 1 and moved Web Analytics to Domain 2 with JS Snippet
  4. Problem solved.

It seems that domain 1 affected domain 2 in some way.

Crystal clear?

When you say “pointed domain 1 to domain 2” do you mean they were both domains configured on Cloudflare and you used a CNAME between the two? Was the CNAME to Domain 2 orange-clouded during this time?

I’m assuming at some point in the transition Domain 2's settings were being overwritten by Domain 1 causing a mismatch in the CORS headers for clients.

If it’s resolved now - that’s good news.

Yes, both domains are in Cloudflare. I may have done this in the wrong way. Please correct me if I should have done in another way:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.