Re: [squid-users] Squid Whitelist Regexp Question.

From: Matus UHLAR - fantomas <uhlar_at_fantomas.sk>
Date: Wed, 25 Feb 2009 10:28:31 +0100

> > On 21.02.09 16:18, Brian Carpenter wrote:
> >> I am blocking access to .google-analytics. on my home network, but a
> >> few sites like songza.com require a google-analytics.com cookie to be
> >> set in order to function properly. �So my question is this, how do I
> >> allow google-analytics.com, but only from a certain domain, such as
> >> songza.com or whatever? �I have no clue when it comes to regexp.

> On Tue, Feb 24, 2009 at 8:44 AM, Matus UHLAR - fantomas
> <uhlar_at_fantomas.sk> wrote:
> > you must check for referer in allowed domains.

On 24.02.09 11:16, Brian Carpenter wrote:
> That's great, but it doesn't explain how I go about doing it. :)

through referer_regex acl matching domains that need working
google-analytics

acl google_analytics dstdomain .google-analytics.com
acl need_google_analytics referer_regex \.example\.com
http_access allow google_analytics need_google_analytics
http_access deny google-analytics

hmmm, maybe it could be simpler with

http_access deny google-analytics !need_google_analytics

if you allow access elsewhere, and would allow to produce error message for
sites that refer to google-analytics and you didn't allow them...

-- 
Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Silvester Stallone: Father of the RISC concept.
Received on Wed Feb 25 2009 - 09:28:52 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 25 2009 - 12:00:01 MST