How to set the Referer bucket policy in spaces?

Posted December 5, 2021 83 views

My digitalocean space bucket is located at singapore ( and i have updated following policy to it. it applied successfully.

“Statement”: [
“Effect”: “Allow”,
“Principal”: “”,
“Action”: “s3:GetObject”,
“Resource”: [
“Condition”: {
“StringLike”: {
“aws:Referer”: [*


s3cmd setpolicy policy.json s3://chathuranga

Expected behaviour

If i am accessing the content outside the, it should deny.

Current behaviour

The content can be access from any domain.

Can anyone suggest what is wrong here? I have created the another bucket in and did the same. same result.


Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!