update
Some checks failed
CI / build-test-release (push) Failing after 8m12s

This commit is contained in:
Jorijn van der Graaf 2026-07-30 23:01:10 +02:00
commit 0ef824418b

View file

@ -1801,6 +1801,21 @@ int Crafter::Run(int argc, char** argv) {
" header Cross-Origin-Embedder-Policy \"require-corp\"\n"
" header Cross-Origin-Resource-Policy \"same-origin\"\n"
" header Cache-Control \"no-store\"\n"
// Every EnableWasiBrowserRuntime consumer is a
// single-page wasm app by construction: the
// generated index.html ships an empty <body> and
// the module builds the DOM at runtime. So an app
// that routes on window.location has no file on
// disk for any path but "/", and a bare
// file_server 404s every deep link, refresh and
// shared URL during development.
//
// try_files falls through to index.html only for
// paths that are not real files, so static assets
// still serve normally and a genuinely missing
// asset becomes a visible wrong-content-type
// rather than a silent 404 the app can't see.
" try_files {{path}} /index.html\n"
" file_server\n"
"}}\n",
port, absDir.string()));