Closed afonsolage closed 7 months ago
Whenever I need to test a local wasm, I kept getting CORS errors since all requests uses mode cors (https://github.com/emilk/ehttp/blob/master/ehttp/src/web.rs#L45C5-L45C43). It would be nice to be able to configure on request which mode we would like to use, like no-cors.
no-cors
This only affects wasm, tho, since CORS is something only available on browsers.
Good idea! Would you like to make a PR?
I suggest we use an enum for this that one can set on ehttp::Request, and that is simply ignored on native.
enum
ehttp::Request
Done! #52
Whenever I need to test a local wasm, I kept getting CORS errors since all requests uses mode cors (https://github.com/emilk/ehttp/blob/master/ehttp/src/web.rs#L45C5-L45C43). It would be nice to be able to configure on request which mode we would like to use, like
no-cors
.This only affects wasm, tho, since CORS is something only available on browsers.