From a69131059e658d4168429233380134b50091c81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9renger=20Dalle-Cort?= Date: Thu, 16 Jan 2025 15:58:24 -0500 Subject: [PATCH] feat(web): add .htaccess as asset --- .htaccess | 13 +++++++++++++ rake/ndbl.rb | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 000000000..8594db0b5 --- /dev/null +++ b/.htaccess @@ -0,0 +1,13 @@ +# https://emscripten.org/docs/compiling/WebAssembly.html#web-server-setup + +Header add Access-Control-Allow-Origin "*" +Header add Cross-Origin-Opener-Policy "same-origin" +Header add Cross-Origin-Embedder-Policy "require-corp" +Header add Cross-Origin-Resource-Policy "cross-origin" + +Options +MultiViews +RemoveType .gz +AddEncoding x-gzip .gz +AddType application/octet-stream .data +AddType application/wasm .wasm + diff --git a/rake/ndbl.rb b/rake/ndbl.rb index 8995d5efe..968b4b4d5 100644 --- a/rake/ndbl.rb +++ b/rake/ndbl.rb @@ -61,6 +61,12 @@ "assets/images/nodable-logo-xs.png", ] +if PLATFORM_WEB + ndbl_app.assets = FileList[ + ".htaccess" + ] +end + ndbl_app.link_library |= [ $tools_gui, $tools_core,