我有一个S3 Bucket名称“cdn.myexmaple.com”
我设置Cloudflare指向我的网站“myexample.com”DNS
CNAME cdn cdn.myexample.com.s3.amazonaws.com
如何设置我的存储桶策略允许Cloudflare获取存储桶对象?
有一种方法可以设置S3 Bucket允许http参考:
{
"Version":"2012-10-17",
"Id":"http referer policy example",
"Statement":[
{
"Sid":"Allow get requests originated from www.example.com and example.com",
"Effect":"Allow",
"Principal":"*",
"Action":"s3:GetObject",
"Resource":"arn:aws:s3:::cdn.myexample.com/*",
"Condition":{
"StringLike":{
"aws:Referer":[
"http://cdn.myexample.com/*",
"http://www.myexample.com/*"
]
}
}
}
]
}
我可以设置允许CLoudFlare访问对象的警察吗?