SECURITY_ERR:DOM 异常 18 仅在 Safari 中

发布于 2025-01-06 02:45:10 字数 283 浏览 3 评论 0原文

我有两个服务器(prod.example.com 和 img.example.com),

所以在“prod”上,我使用 FF 和 Chrome 中的画布处理来自“img”的图像,

一切正常

,但在 Safari 中我得到了这个 SECURITY_ERR: DOM异常 18:试图突破用户代理的安全策略。

来自“img”的所有图像在标头中都有 Access-Control-Allow-Origin:*

那么在哪里帕德拉?

i got two servers (prod.example.com and img.example.com)

so on "prod" i process images from "img" using canvas

in FF and Chrome all is Ok

but in Safari i got this SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.

all images from "img" has Access-Control-Allow-Origin:* in headers

so where is padla?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏の忆 2025-01-13 02:45:10

如果您尝试从一台主机访问另一台主机,您可能调用的 getImageData 将会引发此问题。您无法解决此问题,解决此问题的唯一方法是将代理从 img.example.com 代理到 prod.example.com

getImageData which you probably call will raise this if you try to access the one host from the other. You cannot go around this, the only way around it would be to proxy from img.example.com to prod.example.com

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文