server { listen 80; server_name _; root /usr/share/nginx/html; # WASM MIME type include /etc/nginx/mime.types; types { application/wasm wasm; } # Cache JS and WASM aggressively (content-addressed by build) location ~* \.(js|wasm)$ { add_header Cache-Control "public, max-age=31536000, immutable"; add_header Cross-Origin-Resource-Policy "cross-origin"; add_header Cross-Origin-Embedder-Policy "require-corp"; } location / { try_files $uri =404; } }