Question

How to prevent hotlinking in spaces?

How to prevent hotlinking I’m using spaces, trying to use the answers in the community to prevent hotlinks, after editing and successfully saving the bucket rule in the s3 browser with no effect Here is a link to the community about the s3 bucket space strategy. https://www.digitalocean.com/community/questions/how-to-set-policy-of-space

Is there any other way to prevent hotlinking?


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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
August 22, 2022

Hello,

I believe that you should be able to do that with the CORS policies. You can basically set CORS policies to allow embedding of content from your domains:

https://www.digitalocean.com/docs/spaces/how-to/cors/

You will want to add your exact domain including subdomain and HTTP/HTTPS https://www.mydomain.com and check the GET box.

Hope that this helps!

Regards,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up