This commit is contained in:
parent
5fa9c8a816
commit
0ef824418b
1 changed files with 15 additions and 0 deletions
|
|
@ -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()));
|
||||
|
|
|
|||
Loading…
Reference in a new issue