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

后端 未结 4 1412
清酒与你
清酒与你 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 14:54

    You could refuse any requests for images that don't have your site in the HTTP referer header field. That's the theory. In order to control requests in your application, you'd have to stream all images through an ASP page (as opposed to linking to them directly).

提交回复
热议问题