How to set the Referer bucket policy in spaces?

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”: [ “arn:aws:s3:::chathuranga”, "arn:aws:s3:::chathuranga/”, ] “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

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer