Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)

I am developing a web page using JavaScript and HTML, everything was working good when I have received this list of errors from my HTML page:

The resource from “https://raw.githubusercontent.com/dataarts/dat.gui/master/build/dat.gui.min.js”   was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff). The resource from “https://raw.githubusercontent.com/mrdoob/three.js/dev/build/three.js” was   blocked due to MIME type mismatch (X-Content-Type-Options: nosniff). The resource from “https://raw.githubusercontent.com/mrdoob/three.js/master/examples/js/renderers/CanvasRenderer.js”   was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff). The resource from “https://raw.githubusercontent.com/mrdoob/three.js/master/examples/js/renderers/Projector.js”   was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff). The resource from “https://raw.githubusercontent.com/mrdoob/three.js/dev/build/three.js” was   blocked due to MIME type mismatch (X-Content-Type-Options: nosniff). 

These errors appeared after an automatic browser update (Mozilla Firefox), may be something has been changed in the set up. Do you know any way to solve this problem?

like image 673
Sim81 Avatar asked Nov 21 '16 20:11

Sim81


2 Answers

Check if the file path is correct and the file exists - in my case that was the issue - as I fixed it, the error disappeared

like image 199
dav Avatar answered Oct 02 '22 13:10

dav


This can be fixed by changing your URL to use a mirror/proxy. Instead of using GitHub:

https://raw.githubusercontent.com/svnpenn/bm/master/yt-dl/yt-dl.js Content-Type: text/plain; charset=utf-8 

Use a third-party cache:

https://cdn.rawgit.com/svnpenn/bm/master/yt-dl/yt-dl.js content-type: application/javascript;charset=utf-8 

rawgit.com was a caching proxy service for GitHub that has shut down since 2018. See its FAQ

like image 33
Zombo Avatar answered Oct 02 '22 12:10

Zombo