-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upload组件OSS跨域问题 #3594
Comments
Translation of this issue: upload component OSS cross-domain problemReproduction linkhttps://p7pywo.run.stackblitz.io/ Steps to reproduceUpload step in the official example
What is expected?Upload success What is actually happening?Cross-domain
|
@VolcanoOves 建议同富文本框的请求参数(包括: |
@cipchk 富文本发起的是post请求,上传组件发起的是一个options请求返回200,但是控制台输出了跨域错误,options请求成功之后也没有发起post请求 |
Access to XMLHttpRequest at 'https://xden.oss-cn-beijing.aliyuncs.com/' from origin 'https://angular-bvcvps.stackblitz.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute. |
@cipchk 就是这个withCredentials的参数问题,我删除该项之后就成功上传。谢谢 |
Reproduction link
https://p7pywo.run.stackblitz.io/
Steps to reproduce
官方例子中的上上传步骤
2.点击上传,出现跨域报错,但是查看请求是返回200
3.已经确定在oss上设置过跨域配置,并且在同一个页面上使用富文本上传图片到同一个oss的同一个bucket下成功,并没有出现跨域。
What is expected?
上传成功
What is actually happening?
跨域
The text was updated successfully, but these errors were encountered: