Using a different CDN?

Hey, can you also offer jsdeliver for the codemirror if the script detects that cloudflare cant load?
Cloudflare doesnt load here as it’s in one of our dns filter lists.

I tried the following code:

fetch(“”).then((response) => {
if (response.ok) {
return response.json();
} else {
throw new Error(‘Something went wrong’);
.then((responseJson) => {
// Do something with the response
.catch((error) => {
const fixCdn = setInterval(() => {
if (CodeMirror.modeURL) {
CodeMirror.modeURL = “
}, 999)

but get blocked:
loadmode.js:46 Refused to load the script ‘’ because it violates the following Content Security Policy directive: "script-src ‘self’
  'sha256-IWN+DH0UXsSKPql06C66AvLM8/jMYbOe+wVRfPlzHDY='". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

try making your own that should work

This post was flagged by the community and is temporarily hidden.

My own Its a cdn issue with codemirror and my end

I was able to implement that using

and a glitch project

Link does not seem to be working for me @blubbll

Is CloudFlare blocked by your ISP? If so it would be a good idea to make a topic on the CloudFlare community as they’ll probably have your ISP remove the block. Also if your ISP blocks CloudFlare CDN/DNS then you’re a bit screwed for a lot of sites…

Also to note that jsdelivr just falls back on 3 CDN providers anyway:

  • Stackpath
  • CloudFlare
  • fastly

Sorry if I didn’t understand your topic that much, it seems a little confusing.

it was an early try to proxy but failed.

the codemirror is blocked cuz its loaded by cloudflare. cloudflare is blocked by our network admins atm. i guess i just gonna use a chrome taste with security disabled to override the over-aggresive csp and then just use the js in the second post…

1 Like

Ah. It’s a bit odd that your network admins decided to block the CloudFlare CDN… If you have a little server (e.g A Raspberry Pi) at your house you could run a basic VPN on it. The only issue then is you wouldn’t be able to access any network drives on the network (not your home network).

nevermind, cloudflare got unblocked after a lot of weeks and calls.

1 Like