fix: set __WZP_BASE_URL before loading variant scripts (WASM path resolution)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-30 16:13:03 +04:00
parent 8a4f0ef8ee
commit 7924871559
3 changed files with 9 additions and 1 deletions

View File

@@ -1711,6 +1711,8 @@ async function loadAudioVariant(variant) {
if (!file) return null;
try {
// Set base URL so variant scripts resolve WASM imports via /audio/ path
window.__WZP_BASE_URL = SERVER + '/audio';
const script = document.createElement('script');
script.src = SERVER + '/audio/js/' + file;
await new Promise((resolve, reject) => {

View File

@@ -20,5 +20,11 @@ voip.manko.yoga {
reverse_proxy wzp-web:8080
}
# WZP WASM module (needed by audio variants loaded from /audio/js/)
handle /audio-wasm/* {
uri strip_prefix /audio-wasm
reverse_proxy wzp-web:8080
}
reverse_proxy warzone-server:7700
}