【发布时间】:2021-06-17 21:27:33
【问题描述】:
我有两个 S3 存储桶。
-
my-js-bucket有 ViewerJS 库文件 -
my-file-bucket有我要查看的文件
我将以下内容添加到 my-file-bucket 的 CORS:
[
{
"AllowedHeaders": [],
"AllowedMethods": [
"GET"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]
当我尝试加载页面时,例如:
https://my-js-bucket.s3.ca-central-1.amazonaws.com/ViewerJS/index.html#https://my-file-bucket.s3.ca-central-1.amazonaws.com/logo.png
我在控制台中收到 CORS 错误。
【问题讨论】: