My company is blocking sentry.io after logging in because you guys are using a cdn for javascript assets and not handling the cross origin request properly.
Error in dev tools
Access to Script at s1.sentry-cdn .com/_static/6bab65551b04a1f1a918663f982bb506/sentry/dist/app .js from origin https://sentry.io has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin sentry .io is therefore not allowed access. The response had HTTP status code 403.
Error in UI
Please wait while we load an obnoxious amount of JavaScript.
You may need to disable adblocking extensions to load Sentry.
Today is the first day I’ve noticed (probably haven’t signed in since end of last week). But it’s been consistent today, from multiple computers and browsers. I do know they’ve been increasing/ tightening things on our internal network lately so it’s likely related, but was hoping it was a setting that could be updated, but you’re showing that maybe it already is.
Yeah, if you can reproduce the issue with curl or post some screenshot of your error/debug console, that’d be useful. I’m curious what response you’re getting back that’d trigger this.
It doesn’t seem to me like it’s anything we’re doing on our end.
curl definitely helped expose the deeper issue. It is being blocked by our web filter, it’s falling in the uncategorized/unknown basket and being blocked.
Yeah, this is great to know, but I literally no idea how how we’d do that. I think it’d have to be user generated and sourced. I’m not sure how every company in the world maintains swapping out URLs.
One thing to point out is we did just the other day, swap out a different hostname for this one.
It was previously 75ff019b64fc4358.freetls.fastly.net but we swapped it out for s1.sentry-cdn.com which is just an alias for it, backed by the same service. Just… less sketchy looking.
Hey @matt, We’re also having a CORS issue trying to include the latest sentry javascript SDK via the CDN url listed in Getting Started. Curl request shows the Access-Control-Allow-Origin header hasn’t been properly set.
Getting Started Ex: <script src="https://js.sentry-cdn.com/___PUBLIC_KEY___.min.js" crossorigin="anonymous"></script>
First I want to apologize for this happening. We pushed out the new SDKs yesterday and part of that promoted the CDN loader for new customers in the documentation. However unfortunately the CDN loader was served up with the incorrect access control headers and as such refused to load when the crossorigin attribute was set to anonymous.
I’m still trying to find out why we missed it but our own usage did not show this as an issue as we were using it from the same domain ourselves. We should have vetted this better.
For now we pointed the documentation for new users to use the underlying javascript SDK and we will put the docs back to the loader when we properly verified that there are no lingering issues we overlooked.
In addition the loader is now fixed for users who are already using it as new headers are emitted. This issue should not occur any more.
Please accept my sincere apologies for this issue. This was not professionally handled and should not have happened. If you have any questions about this feel free to reach out to armin@sentry.io with questions.
I am facing the same issue. I have tried loading Lazy-Loading Sentry in native JS and get the following error - Access to fetch at ‘https://sentry.abc.com/api/8/envelope/?sentry_key= *key* &sentry_version=7’ from origin ‘[https://abc.com](https://abc.com/)’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
I have used the following settings in my app -
The second method that I have tried using JavaScript SDK without any additional configuration - <script src='https://sentry.abc.com/js-sdk-loader/_key_.min.js' crossorigin="anonymous"></script>