I have built a blazor webassembly site which I host on an ubuntu server using nginx. The configuration of the site in nginx is like this:
server {
server_name app.mysite.local;
root /srv/sites/app.mysite.local;
index index.html;
}
I published the site using visual studio to a local folder and copied the /dist folder to the root of /srv/sites/app.mysite.local. The site is now working on app.mysite.local but I get the folowing error messages:
WASM: wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
WASM: falling back to ArrayBuffer instantiation
I tried adding 'application/wasm wasm' to the files /etc/mime.types and /etc/nginx/mime.types and restarted the server but without any effect. I don't know if these error messages are connected.
What I also noticed is when I go to /account/companyname using the menu on the index page, the page is displayed but I when I type the url app.mysite.local/account/companyname in the address bar I get an nginx 404 error. Maybe this is solved when I solve the mime type issue but I don't know that for sure.
Can anybody help me solving the mime type issue? Let me know if you need more information. Thanks in advance!