0

We are loading bootstrap from CDN and recently, bootstrap stopped working for one of our client. It does not happen for other clients. We look at the console and network tab.

In console tab, there is a warning saying "Cross origin read block (CORB) blocked the cross origin resources "https:bpb.opendns.com/b/https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" with mime type text/html"

In network tab, we are getting 302 status for bootstrap files and then 200 statuses with 0 byte file size. Refer the attachment to see errors.

We are using below tag to load bootstrap

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css">
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

Console log

Network log

Our website use HTML 5. We did not specify type and cross origin attribute for those CSS and script(type is optional for html5). Could this be the reason for this issue?

sideshowbarker
  • 72,859
  • 23
  • 167
  • 174

2 Answers2

0

Have you tried this by any chance? It might work. Not EXACTLY the same issue, but might help. This might have some implications on your security, so if this works, you might want to play around with limiting specific headers and such.

http://dotnet-concept.com/Tips/2015/3/5798824/Cross-Origin-Request-Blocked-The-Same-Origin-Policy-disallows-reading-the-remote-resource-This-can-be-fixed-by-moving-the-resource-to-the-same-domain-or-enabling-CORS

Also, a comment on this post suggests maybe having your client refresh their browser cache. It also provided other good suggestions: Cross-Origin Read Blocking (CORB)

I would try the latter before trying the former.

Ladle.

Gooby200
  • 41
  • 3
0

What server do you use for hosting the website? If there is no change in code, then you should check the server permissions to access external sources. Add a CORS policy to CDN's you use. More info about CORS here .

Allow CORS in Apache server here.

Allow CORS in IIS server here.

Allow CORS in Azure server here.

dobre.b
  • 64
  • 1
  • 8