拒绝执行来自 '..../angular.min.js' 的脚本,因为它的 MIME 类型('application/octet_stream')不可执行,并且严格的 MIME 类型检查

Refused to execute script from '..../angular.min.js' because its MIME type ('application/octet_stream') is not executable, and strict MIME type check

我看到了几个关于这个错误的问题,但不确定,对于某些网站,它是否有效。相同 angular.js,相同 html。 即使在我的本地主机上一切正常(即使内容类型为 application/octet_stream),但使用其他网站时却没有(相同 Chrome...)

有什么想法吗?

如果您在 Web 服务器中配置了 X-Content-Type-Options: nosniff HTTP Header,则浏览器将无法“嗅探”内容以猜测其类型,因此您必须将其与合适的content-type.