How to prevent image hotlink from your ASP.NET site?

后端 未结 4 1411
清酒与你
清酒与你 2021-02-06 14:01

What is the best/simplest way to prevent people hotlinking to images from my hosted ASP.NET website? I don\'t need to prevent all images/resources from hotlinking, I just want t

4条回答
  •  迷失自我
    2021-02-06 15:03

    One thing I've seen that I thought was clever is to add an extra portion to the bottom of the image, and then use a css sprite technique to cut it off when shown on your site. A naive hotlink will result in displaying your extra portion. This will mean the image is skewed, so it doesn't look right on the other site, and you can use the extra portion to show your own url or whatever else you want.

提交回复
热议问题