Question

How can I secure delivery of cached private user content on a Spaces CDN?

I’ve found this feature from Azure:

https://docs.microsoft.com/en-us/azure/cdn/cdn-token-auth

How could I do something similar with DigitalOcean Spaces?

I’ve built out a slideshow SPA that I would like to integrate a scalable storage solution with. The slideshows contain images that must be served quickly, and cannot be served to other users.

I’ve seen this kind of system implemented by large companies like Google, but I haven’t found much info on this kind of system online.

I currently require a bearer token in my API, check the token, and the server the image from the server’s file system. I’d like to get the quick delivery of a CDN, but I also need good security for my users.

Show comments

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I asked this question a while ago and I think this won’t be offered without a price tier change. One way you could do it. Is setup api instances in all major locations. When a request comes in, check location of where its coming from and redirect it to one of your api instances thats closest. Then handle authenticating it and serving the file.

I know its not the best idea. But if you want to use Spaces its an option.