Code Tips

Publish: November 4, 2020 No Comments

加载wasm出现Incorrect response MIME type. Expected
由于MIME-TYPE不对,期望.wasm 文件的响应头的Content-Type字段值为"application/wasm",而不是"application/octet-stream; charset=UTF-8"。服务端必须对.wasm文件做正确的MIME类型的配置,发送Content-Type: application/wasm 头。

找到mime.types文件直接加入这一行:

application/wasm                      wasm;

然后重启nginx服务

Leave a Comment