【发布时间】:2020-11-10 02:37:04
【问题描述】:
我在一个网站工作。我的<head> 如下所示。
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<script type="text/javascript" src="http://github.com/mrdoob/three.js/blob/dev/build/three.min.js"></script>
<script type="text/javascript"
src="http://github.com/pchen66/panolens.js/blob/master/build/panolens.min.js"></script>
<script>
const panorama = new PANOLENS.ImagePanorama('./images/project.jpg');
const viewer = new PANOLENS.Viewer();
viewer.add(panorama);
</script>
</head>
但我收到错误The resource from “https://github.com/pchen66/panolens.js/blob/master/build/panolens.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
为什么我会看到这个错误?
【问题讨论】:
-
因为 github 不希望你链接到文件......它被设置为不同的内容类型。
标签: javascript mime-types src