Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

版本1.0.3跨域问题 #868

Open
a6374482 opened this issue Jan 23, 2025 · 3 comments
Open

版本1.0.3跨域问题 #868

a6374482 opened this issue Jan 23, 2025 · 3 comments

Comments

@a6374482
Copy link

直接在浏览器中输入图片地址可以打开并看到图片但是传入组件中就报无法跨域

Image
试了各种方法都不好使 版本1.0.3

@a6374482
Copy link
Author

Image
地址放入浏览器可以直接打开 排除后端跨域问题
这都2025年了 还没解决跨域问题吗!!!

@xyxiao001
Copy link
Owner

和组件没关系,浏览器和截图跨域不是一个概念

@huhai0403
Copy link

这都2025年了你还不理解跨域吗
图片的跨域限制
浏览器的同源策略(SOP)限制了不同源之间的资源访问。即使你可以在网页中直接展示图片(通过 标签),但这并不意味着你可以对图片进行进一步的处理(如裁剪、转换为 Base64 等)。这是因为 标签的显示不受跨域限制,但通过 JavaScript 或 Canvas 对图片进行操作时,浏览器会检查图片的跨域权限。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants