总是提示下面的错误,怎么改都不行。
Fetch API cannot load http://*/58a2a3053615a082a030267bd8cd593a.jpg. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 503. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
这个错误跟STS一点关系也没有啊。
这个错误指的是没有设置CORS请求。
你需要设置CORS
https://help.aliyun.com/document_detail/31870.html?spm=5176.doc31952.6.603.CWAuxs
SDK实现见:
https://help.aliyun.com/document_detail/32018.html?spm=5176.doc31870.6.665.QNyDjT
控制台设置见:
https://help.aliyun.com/document_detail/31903.html?spm=5176.doc31893.6.917.Y3L6Aj
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。