I’m not sure about why the CORS error occurs, but when I lookup the docs, it recommends us to use api.
This might help you. I’ve tested on OBS (windows 10 x64), and it works well.
Hope this helps you.