Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/network/fetch.proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,23 @@ export class FetchProxyHandler<T extends typeof fetch> implements ProxyHandler<T
}

this.onUpdateCallback(item);

// Check if it's a WebAssembly-related request
// Determine if it's a WebAssembly file (.wasm) by checking the Content-Type or URL suffix.
const contentType = resp.headers.get('content-type');
const isWasmRequest =
(contentType && contentType.includes('application/wasm')) ||
(item.url && item.url.toLowerCase().endsWith('.wasm')) ||
(item.url && item.url.toLowerCase().includes('/wasm'));

// If it's a WebAssembly request, return the original Response object without proxying
if (isWasmRequest) {
// Log but do not affect the original Response
console.debug('[vConsole] WebAssembly request detected, skipping proxy for:', item.url);
return resp;
}

// Other requests use proxy
return new Proxy(resp, new ResponseProxyHandler(resp, item, this.onUpdateCallback));
};
return then;
Expand Down