[Zope] Image Referers

HoYin Au hya-zope@bluesite.com
Wed, 09 Jan 2002 02:12:23 -0500


How do I go about writing an access rule for images & binary data (like 
zip files, mp3's, wavs, etc.) that will return an access denied message 
if the HTTP_REFERER header doesn't match value(s) that I define?  We're 
trying to discourage direct-linking to our images on other people's 
sites, but also need to have the ability to have exceptions, i.e.

The image is hosted on somesite.com.  Anypage from www.somesite.com, 
www.anysite.com (which is an affiliate), xyz.somesite.com, etc. can also 
link to the image.  If the image isn't called from those pages, return 
either an access denied message, or an "Image hosted by somesite.com" image.