good first issue
描述
Describe the bug Some web servers do not have CORS properly configured. While they may not intend to block cross-origin requests, they do. If a style program in the IDE references an image on one of these servers, then the browser will block the image fetch.
To Reproduce
- Open the IDE
- Load the tree-venn-3d example.
- Change both hrefs in
tree-venn-3d.stytohttps://www.cs.cmu.edu/~jssunshi/images/ball.svgand recompile. - Observe the images do not load and the CORS errors in the developer tools console.
Expected behavior This actually is the expected behavior, but people may not appreciate the browser's behavior.
An alternative may be to proxy image fetches and add the CORS headers in the HTTP response headers in the cases where the web server does not have CORS configured. A further alternative is for affected websites to configure CORS to allow cross-origin requests.