Amazon Cloudfront 是否隐藏文件以防止直接下载?
我正在尝试了解 Cloudfront。我们注意到一些视频网站不允许我们下载视频。即没有到该文件的物理链接。或者至少,我无法使用 Firebug 在 Flash 播放器的源代码中找到它。
在某些网站上,典型的代码块可能如下所示:
<object width="496" height="24" type="application/x-shockwave-flash" id="media_player" name="media_player" data="/flash/jwplayer/player.swf" ....>
<param name="flashvars" value="file=http://some_bucket_name.s3.amazonaws.com/uploads/users/1/foo.mp3&title=Test&author=Foobar&plugins=&autostart=true&controlbar=bottom&repeat=none&screencolor=000000">
</object>
在上面,您从 html 源代码中注意到,可以通过物理链接“巧妙”下载该文件: http://some_bucket_name.s3.amazonaws.com/uploads/users/1/foo.mp3。
我了解 CDN 是什么。可以在此处找到很好的解释。
如果我们使用 Cloudfront,这是否会禁止最终用户“巧妙地”直接从我们的应用程序下载媒体文件,因为文件将被流式传输?
Im trying to wrap my head around Cloudfront. We notice some video sites don't allow us to download the video. I.e. there is no physical link to the file. Or at least, I am not able to locate it in the flash player's source code using Firebug.
On some sites, a typical block of code could look like the following:
<object width="496" height="24" type="application/x-shockwave-flash" id="media_player" name="media_player" data="/flash/jwplayer/player.swf" ....>
<param name="flashvars" value="file=http://some_bucket_name.s3.amazonaws.com/uploads/users/1/foo.mp3&title=Test&author=Foobar&plugins=&autostart=true&controlbar=bottom&repeat=none&screencolor=000000">
</object>
Above, you notice, from the html source code, that the file can be 'cleverly' downloaded through the physical link: http://some_bucket_name.s3.amazonaws.com/uploads/users/1/foo.mp3.
I understand what a CDN is. A good explanation can be found here.
If we use Cloudfront, will this disallow end-users from 'cleverly' downloading media files directly from our app since the files will be streamed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如沃克普朗克所说:“你可以让它变得困难,但你不能让它变得不可能。”
As Wukerplank suggested: "You can make it difficult, but you can't make it impossible."
实际上,CloudFront 唯一要做的就是不发出 S3 / EC2 请求。它不是为了增加安全性而设计的,而是为了提高缓存和速度。以下内容应该会使下载链接内容变得更加困难: 如何在不使用签名 URL 的情况下防止 Amazon S3 上的热链接?(检查正确的引荐来源网址)。
Actually, the only thing CloudFront would do is not make S3 / EC2 requests. It's not designed for adding security, but caching and speed. Here's something that should make it harder to download the contents of the link: How do I prevent hotlinking on Amazon S3 without using signed URLs? (checking for a correct referrer).
使用 rtmpe 增加了另一层保护。大多数下载应用程序都遇到困难,但正如 Wukerplank 所说,没有什么是万无一失的。
Using rtmpe adds another layer of protection. Most download apps have difficulties with it, but as Wukerplank says, nothing is bullet proof.