vi /etc/opt/kusanagi/nginx/mime.types
以下を追加
application/wasm wasm;
vi wasm.inc
location ~* \.(wasm)$ {
types {
application/wasm wasm;
}
add_header Cache-Control "public, max-age=604800";
add_header Cross-Origin-Opener-Policy "same-origin";
add_header Cross-Origin-Embedder-Policy "require-corp";
expires 7d;
access_log off;
}
server {
............
include conf.d/wasm.inc;
}
nginx -s reload
ブラウザで .wasm ファイルにアクセスします。
content-type: application/octet-stream
の場合はうまく設定されていません。
以下の場合うまくいっています
content-type: application/wasm