Hi Easyenglish,
If you want to add extra protection please add this to your bucket policy.
Go to your bucket in AWS and click properties under permissions click edit/add bucket policy and paste the following in you will need to be using iframes and also make sure you change the bucket name.
{
"Version": "2008-10-17",
"Id": "S3BubbleSecurity",
"Statement": [
{
"Sid": "1",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::(YOUR BUCKET NAME GOES HERE)/*",
"Condition": {
"StringLike": {
"aws:Referer": [
"https://media.s3bubble.com/*"
]
}
}
},
{
"Sid": "Explicit deny to ensure requests are allowed only from specific referer.",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::(YOUR BUCKET NAME GOES HERE)/*",
"Condition": {
"StringNotLike": {
"aws:Referer": [
"https://media.s3bubble.com/*"
]
}
}
}
]
}
Best Regards
Sam