whisper.cpp
whisper.cpp copied to clipboard
WASM examples could not fetch whisper models due to CORS
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:
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?