【发布时间】:2017-01-04 16:18:08
【问题描述】:
当我尝试使用时:
temp = new createjs.Bitmap(obj.path)
我得到错误:
Uncaught An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images.
这和this question有些关系。除了上述情况,用户没有使用网络服务器。
就我而言,我使用的是网络服务器,但我需要使用 https 将图像托管在 AWS S3 存储桶上。
是否有我可以使用 EaselJs 允许 CORS 的设置?
S3 存储桶上的 CORS 设置:
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
</CORSRule>
</CORSConfiguration>
【问题讨论】:
标签: easeljs