asked on
{
"Version": "2012-10-17",
"Id": "http referer policy",
"Statement": [
{
"Sid": "Allow get requests referred by www.example.com and example.com.",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::wellsource/*",
"Condition": {
"StringLike": {
"aws:Referer": [
"http://zzzz.com/*",
"http://xxxx.com/*",
"http://www.zzzz.com/*",
"https://console.aws.amazon.com/*",
"http://www.xxxx.com/*"
]
}
}
},
{
"Sid": "Explicit deny to ensure requests are allowed only from specific referer.",
"Effect": "Deny",
"Principal": "*",
"Action": [
"s3:DeleteObject",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::wellsource/*",
"Condition": {
"StringNotLike": {
"aws:Referer": [
"http://zzzz.com/*",
"http://xxxx.com/*",
"http://www.zzzz.com/*",
"https://console.aws.amazon.com/*",
"http://www.xxxx.com/*"
]
}
}
}
]
}