whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

WASM examples could not fetch whisper models due to CORS

Open Heaper327 opened this issue 8 months ago • 0 comments

Attempts to run whisper.wasm, stream.wasm, and bench.wasm examples from a locally hosted server all failed, as the website could not fetch whisper models from whisper.ggerganov.com due to CORS: Screenshot 2024-06-04 at 10 10 13 PM Closer inspection shows that whisper.ggerganov.com responds with the following header, with no Access-Control-Allow-Origin entry:

HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Tue, 04 Jun 2024 14:03:27 GMT
Content-Type: application/octet-stream
Content-Length: 32166155
Last-Modified: Sun, 14 May 2023 15:38:57 GMT
Connection: keep-alive
ETag: "64610091-1ead10b"
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Accept-Ranges: bytes

Would it be possible for whisper.ggerganov.com to add Access-Control-Allow-Origin: * to its response header? Or do we just have to change the fetch url to a localhost url for development purposes?

Heaper327 avatar Jun 04 '24 14:06 Heaper327