cargo-wasm icon indicating copy to clipboard operation
cargo-wasm copied to clipboard

Start a local server to avoid CORS restrictions

Open durka opened this issue 7 years ago • 1 comments

On my machine the example doesn't work because the Fetch API is disabled on file URLs. If I start a server like http and access via localhost:3000 then it does work. I'm not sure if there is any other way to get around the restriction.

durka avatar Nov 27 '17 00:11 durka

Agh CORS strikes again. I've had this happen with non-wasm projects before and frankly it's annoying even if it is a good thing to have for security reasons.

I don't think there is a way to avoid, maybe just running a python like simple server and just hosting the files might be a good alternative to the way run currently works.

mgattozzi avatar Nov 27 '17 01:11 mgattozzi