Reputation: 27693
I want to use a CDN to make downloads from my site faster, but it seems like using a CDN will mean anyone with a link to a file will be able to download it, and I want to be able to allow only licensed users to download the file.
This is likely a common requirement, and yet I can't seem to find a source explaining how I would go about doing it.
So how is this achieved?
Upvotes: 0
Views: 163
Reputation: 1543
The CDN I worked on, Google Cloud CDN, uses signed URLs and signed cookies for this purpose. Both allow your backend to issue a time-limited token that authorizes a download. Users could still share the token, but it's valid only for a duration that you choose. There's more information at cloud.google.com/cdn/docs/private-content. Other CDNs have similar facilities.
Upvotes: 1