WASM files have incorrect mimeType
mbalex99 opened this issue · 0 comments
mbalex99 commented
I think this is a pretty popular issue with HTTP servers.
.wasm
files should return an application/wasm
MIME Type not an application/octet-stream
as shown below. Browsers will fail to load the wasm file if the server returns anything other than application/wasm
.
This is what the error is:
Uncaught (in promise) TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
Where would one write code to respond with the correct headers?