Building42 / Telegraph

Secure Web Server for iOS, tvOS and macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WASM files have incorrect mimeType

mbalex99 opened this issue · comments

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.

image

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?