Open takaokouji opened 1 year ago
FYI: Workarounds.
Is this a bug ? or not (specification) ?
It must be a local host bug. Not sure how to fix API or Host servers though.
This is not a bug. api.scratch.mit.edu and assets.scratch.mit.edu have a CORS policy so that only https://scratch.mit.edu can make requests to it. To work around the CORS policy, you will need to set up a CORS proxy for both of the mentioned sites and modify these lines to use the proxied links by default.
Also, I think the CORS policy they added was intended to prevent people from misusing the API from the browser
Expected Behavior
The scratch-gui can access the asset if it is running on anything other than https://scratch.mit.edu.
Actual Behavior
The scratch-gui cannot access the asset if it is running on anything other than https://scratch.mit.edu. It can only on https://scratch.mit.edu. Because it checks CORS every API requests. Also scratch-vm and scratch-storage are same. So, it can't.
Steps to Reproduce
Steps to reproduce the behavior:
System Details
Every system.
Screenshots