From 0ecae41a782198fe424f6d2f1e4f993009bed201 Mon Sep 17 00:00:00 2001 From: Ein Anderssono Date: Fri, 16 Oct 2026 06:55:24 +0200 Subject: [PATCH] Serve Piper worker with JavaScript MIME type --- nginx/default.conf | 5 ++++- scripts/check-frontend.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nginx/default.conf b/nginx/default.conf index 1c85d50..c650692 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -10,7 +10,10 @@ server { } location ^~ /tts/piper-wasm-v1/ { - types { application/wasm wasm; } + types { + application/wasm wasm; + application/javascript js; + } add_header Cache-Control "public, max-age=31536000, immutable" always; try_files $uri =404; } diff --git a/scripts/check-frontend.sh b/scripts/check-frontend.sh index 383d867..4f6badd 100755 --- a/scripts/check-frontend.sh +++ b/scripts/check-frontend.sh @@ -8,6 +8,7 @@ grep -q '' index.html grep -q '' index.html grep -q 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0' nginx/default.conf grep -q 'Cross-Origin-Embedder-Policy "require-corp"' nginx/default.conf +grep -q 'application/javascript js;' nginx/default.conf grep -q "request('/version')" index.html grep -Fq "credentials: 'same-origin'" index.html grep -q 'id="dialogue" aria-label="Dialoghistorik" role="log" aria-live="polite"' index.html