Image has a 'precondition' field, which if I remember right is some method executed before accessing the image... maybe you could write a method to check the http referrer, and see if it's within your site? Or maybe monkeypatch Image to do that with every image? On Monday, March 22, 2004, at 04:30 AM, Ulrich Wisser wrote:
Hi Jake,
I have noticed that more and more sites are hotlinking images from my Zope site. There seem to be solutions for Apache using .httaccess but nothing in Zope or for the products.
the easiest solution would be to create a Python Script, that returns the image in case the referer matches your site or otherwise returns an image with a message like "block due to copyright infringment". This solution will cause some work on your site, cause you will have to move all your images to a new location and replace the old one with the script.
If you have Zope behind Apache you could also block requests in Apache. Apache allows to check referer for blocking, but you can't send them an alternative image.
Ulrich
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )