MIME类型不匹配导致资源被阻止(X-Content-Type-Options:nosniff) [英] Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)

查看:976
本文介绍了MIME类型不匹配导致资源被阻止(X-Content-Type-Options:nosniff)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JavaScript和HTML开发一个网页,当我从HTML页面收到此错误列表时,一切正常工作

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).

自动浏览器更新(Mozilla Firefox)后出现这些错误,可能是
在设置中被更改了。你知道解决这个
问题的方法吗?

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?

推荐答案

检查文件路径是否正确且文件是否存在 - 在我的情况下,这是问题 - 当我修复它时,错误消失了

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

这篇关于MIME类型不匹配导致资源被阻止(X-Content-Type-Options:nosniff)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆