![](/img/trans.png)
[英]Error: Blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)
[英]On Page Refresh I get this: “/assets/css/bootstrap.min.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)
我正在测试我的 MERN 堆栈应用程序,当我在几个组件上刷新浏览器时,我收到以下错误:
The resource from “http://localhost:3000/profile/assets/css/bootstrap.min.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
5e85ba9010ae8d2e58bed308
The resource from “http://localhost:3000/profile/assets/css/mdb.min.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
5e85ba9010ae8d2e58bed308
The resource from “http://localhost:3000/profile/assets/css/styles.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
5e85ba9010ae8d2e58bed308
The resource from “http://localhost:3000/profile/assets/js/jquery.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
5e85ba9010ae8d2e58bed308
The resource from “http://localhost:3000/profile/assets/js/popper.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
5e85ba9010ae8d2e58bed308
The resource from “http://localhost:3000/profile/assets/js/bootstrap.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
5e85ba9010ae8d2e58bed308
Loading failed for the <script> with source “http://localhost:3000/profile/assets/js/jquery.min.js”. 5e85ba9010ae8d2e58bed308:31:1
The resource from “http://localhost:3000/profile/assets/js/mdb.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
5e85ba9010ae8d2e58bed308
The resource from “http://localhost:3000/profile/assets/js/popper.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
当组件第一次加载时,它可以很好地加载所有设计和格式。 当我按下刷新按钮时,所有样式都消失了,变成了纯文本。
我正在使用 Redux 和反应。
检查文件是否存在于以下文件夹中,可能是它们丢失了
http://localhost:3000/profile/assets/css/
http://localhost:3000/profile/assets/js/
您也很可能需要 jquery.min 的 CDN 网址,例如https://code.jquery.com/jquery-3.5.0.slim.min.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.