chore(docker): R2 application image with the Rust core — wasm stage, precompressed module, CSP proof on the image

Dockerfile stage 0 (rust:1.99.0-bookworm, wasm32 target, wasm-bindgen-cli
at the builder's pinned version, cargo cache mounts) builds the shipped
module with scripts/wasm-build.sh (WASM_BUILD_SHIPPED_ONLY=1); the Node
stage copies packages/core-wasm (manifest + pkg/); the runner gzips the
module and nginx serves it with gzip_static (application/wasm, 1,180,153
bytes raw, 372,275 served). docker/csp-proof/app-image.sh runs the real
image behind the DEPLOY.md CSP in headless Chromium: with
'wasm-unsafe-eval' a report is created and a zone click is applied by the
core with no script or wasm violation; without it the editor shows the
degraded notice, stays put and leaves the draft untouched; /login,
/app/account and / never request the module (15/15 checks).
This commit is contained in:
bchanot committed 2026-10-14 00:45:51 +02:00
1 parent 74fcb37564
commit 7be94d4ce6
5 files changed
+183 -7

No files matched your search

+3 -1
View File
@@ -11,8 +11,10 @@ server {
try_files $uri =404;
}
# Assets with long-lived cache (Vite hashes filenames)
# Assets with long-lived cache (Vite hashes filenames); the core module ships with a
# precompressed .wasm.gz sibling built into the image
location /assets/ {
gzip_static on;
add_header Cache-Control "public, max-age=31536000, immutable";
}