gpt4 book ai didi

javascript - 根据 HTML 规范对模块脚本执行严格的 MIME 类型检查

转载 作者:行者123 更新时间:2023-12-05 08:10:40 25 4
gpt4 key购买 nike

我的 JavaScript 应用程序出现以下错误:

Failed to load module script: The server responded with a non-JavaScript MIME type of “application/octet-stream”. Strict MIME type checking is enforced for module scripts per HTML spec.

如何让我的脚本运行?

最佳答案

在您的 nginx 配置文件中添加以下行:

server {
...
default_type application/javascript;
...
}

关于javascript - 根据 HTML 规范对模块脚本执行严格的 MIME 类型检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71286712/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com