rollbar / rollbar.js

Error tracking and logging from Javascript to Rollbar

Home Page:https://docs.rollbar.com/docs/javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cross Origin Request Blocked on Firefox

artooras opened this issue · comments

I'm receiving the following error on Firefox, but not on Chrome or Safari.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.24.0/rollbar.min.js. (Reason: CORS request did not succeed). Status code: (null).

I'm using rollbar in a Next.js application by inserting the Browser JS snippet in the Head of the _document.js.

Anyone else observed this behaviour?

The preferred CDN URL is at cdn.rollbar.com. e.g. https://cdn.rollbar.com/rollbarjs/refs/tags/v2.24.0/rollbar.min.js

Rollbar has full control over the response headers from that URL, which is one reason to prefer it. I checked the snippet on the doc page, and it's using the correct URL. If you know of another doc location that's still using cdnjs.cloudflare.com, please post a link here.