CodePudding user response:
You can try the following bucket strategyReadonly directory full readable
Refereronly limit referer domain name
{
"Version" : "2012-10-17,"
"The Statement:" [
{
Sid: "everyone can read the file",
"Effect" : "Allow",
"Principal" : "*",
"Action" : "s3: GetObject,"
"Resource", "arn: aws: s3: : : testpolicy readonly/* '
},
{
Sid: "Allow the get requests referred by www.example.com and example.com",
"Effect" : "Allow",
"Principal" : "*",
"Action" : "s3: GetObject,"
"Resource", "arn: aws: s3: : : testpolicy refereronly/*",
"Condition" : {
"StringLike" : {
"Aws: Referer" :
"Http://www.example.com/*,"
"Http://example.com/*
"]
}
}
}
]
}
Reference: https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/dev/example-bucket-policies.html
CodePudding user response:
Set, seem to have no use