当从s3.amazonaws服务器检索图像时,使用A-Frame库在iOS平台上加载全景图像时,我正面临离子-3中的CORS问题,但它在Android平台上运行得很好。
以下是加载Pan图像的代码。这是在离子内容中以在移动屏幕中显示它
<a-scene>
<a-assets timeout="30000">
<img id="sky" src="{{ imageURL }}" crossorigin="anonymous">
</a-assets>
<a-sky src="#sky" rotation="0 -130 0"></a-sky>
</a-scene>
以下是从网址
获取图片的ts代码export class VrPage {
imageURL: string = '';
constructor() {
this.imageURL = // Image Url of s3.amazonaws server ;
}
}
我在这里收到此错误
[Error] Origin http://10.100.23.247:8100 is not allowed by Access-
Control-Allow-Origin.
[Error] Failed to load resource: Origin http://10.100.23.247:8100 is
not allowed by Access-Control-Allow-Origin. (8nx2daei.jpg, line 0)
[Error] Cross-origin image load denied by Cross-Origin Resource
Sharing policy.
有人可以帮我解决这个问题吗?