pdf 预览报:

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

在这里插入图片描述

报错原因:

在项目里使用了 mjs 文件,而ngnix无法识别该类型的文件

处理方式

1.在服务器nginx目录 找到conf/mime.types 文件找到 application/javascript 项并添加mjs类型
在这里插入图片描述
2.确保nginx.conf里http 里include 了该文件
在这里插入图片描述
3.重启ng服务

./nginx -s reload
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐