Hello, is it posssible to allow access to files from only my website and not directly?
For example when someone type https://cdn.example.com/image.png
from their browser they shouldn’t have access this file but when I put <img src="https://cdn.example.com/image.png"
in my website it should have accessible. Is this possible?
I ask this because I plan to serve large zip files on my CDN, and if these files are accessible to everyone who has a link to them, they can be published on other sites and my bandwidth can fill up quickly. How do I ensure that these files are only downloaded from my site?
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!
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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Heya,
This definitely sounds doable. I believe one way to achieve this will be using a pre-signed URLs.
A pre-signed URL is a connection URL created by an authorised user so that unauthorized users can access restricted resources without sharing credentials.
You can find more information here:
https://docs.digitalocean.com/glossary/pre-signed-url/
Regards