Re: [squid-users] Preventing Hotlinking

From: Henrik Nordstrom <[email protected]>
Date: Sat, 11 Mar 2006 12:22:54 +0100

fre 2006-03-10 klockan 21:28 -0700 skrev John Neiberger:
> On 3/10/06, Henrik Nordstrom <henrik@henriknordstrom.net> wrote:
> > fre 2006-03-10 klockan 16:20 -0700 skrev John Neiberger:
> > > Can we do something similar to that with Squid? Preventing hotlinking
> > > on our webservers won't help us much if the cache server readily
> > > serves up those images to bad referrers.
> >
> > Yes, you can do something similar with the help of the referer acl.
> >
> > Regards
> > Henrik
>
> Thanks! I was taking a quick look through the documentation and I
> didn't see the referrer ACL, although I saw a number of other fields
> from which I could create ACLs.

from the squid.conf documentation

        acl aclname referer_regex [-i] regexp ...
          # pattern match on Referer header
          # Referer is highly unreliable, so use with care

then there is also

        acl aclname req_header header-name [-i] any\.regex\.here
          # regex match against any of the known request headers. May be
          # thought of as a superset of "browser", "referer" and "mime-type"
          # ACLs.

and

referer_log

        Squid will write the Referer field from HTTP requests to the
        filename specified here. By default referer_log is disabled.

Regards
Henrik

Received on Sat Mar 11 2006 - 04:23:10 MST

This archive was generated by hypermail pre-2.1.9 : Sat Apr 01 2006 - 12:00:04 MST