How do I prevent hotlinking on Amazon S3 without using signed URLs?

后端 未结 7 749
误落风尘
误落风尘 2020-12-24 02:36

Is there any way I can prevent hotlinking on Amazon S3 without using signed URLs?

7条回答
  •  一向
    一向 (楼主)
    2020-12-24 03:31

    I use Apache RewriteMap to remap relative links to select file extensions -- *.jpg, *.gif, *swf, *.fla to Cloudfront. Basically makes the url of your images present as relative links to your site. It doesn't prevent discovery of the S3/cloudfront url totally, just adds a layer of difficulty for the would be thief.

    Might be worth a try, apply the hotlink restrictions via htaccess with the above method in place. I haven't tried it myself.

提交回复
热议问题