Amazon s3 我可以为cloudflare设置aws S3策略吗?
我有一个S3 Bucket name“cdn.myexmaple.com” 我将Cloudflare point设置为我的站点“myexample.com”DNS 如何设置我的bucket策略允许Cloudflare获取bucket对象 有一种方法可以设置S3 Bucket allow http,如下所示:Amazon s3 我可以为cloudflare设置aws S3策略吗?,amazon-s3,cloudflare,Amazon S3,Cloudflare,我有一个S3 Bucket name“cdn.myexmaple.com” 我将Cloudflare point设置为我的站点“myexample.com”DNS 如何设置我的bucket策略允许Cloudflare获取bucket对象 有一种方法可以设置S3 Bucket allow http,如下所示: { "Version":"2012-10-17", "Id":"http referer policy example", "Statement":[ { "
{
"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访问对象的策略吗?我们已经有了相关提示
只要我们在您的DNS设置中代理记录,一切都会正常工作。OMG~非常感谢!!我明白了@damoncloudflare如果public getObject被限制为上述引用,这是否继续有效?或者是否有需要在那里发生的特定链接?直接阻止对我的s3存储桶的请求(而不是通过cloudflare)如何?cloudflare不适用于上述示例?
{
"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/*"
]
}
}
}
]
}