[squid-users] strip Referer header based in source

Prasad Yalla mailmegoodies at gmail.com
Sun Jan 11 13:22:02 UTC 2015


Putting src tries to match IP of the PC from which the request originated.
But thanks, I got this figured out with the referer_regex acl, it looks
something like this:

acl referer_allowsrc referer_regex -i  ^http://testing.abc.com  [here
testing.abc.com is the referring site]
header_access Referer deny referer_allowsrc

this strips the reference header whenever there is testing.abc.com in the
reference header.

On Sun, Jan 11, 2015 at 3:36 AM, Yuri Voinov <yvoinov at gmail.com> wrote:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> http://wiki.squid-cache.org/SquidFaq/SquidAcl#Differences_between_.27.27src.27.27_and_.27.27srcdomain.27.27_ACL_types
>
> For the /srcdomain/ ACL type, Squid does a reverse lookup of the client's
> IP address and checks the result with the domains given on the /acl
> <http://www.eu.squid-cache.org/Doc/config/acl>
> <http://www.eu.squid-cache.org/Doc/config/acl>/ line. With the/src/ ACL
> type, Squid converts hostnames to IP addresses at startup and then only
> compares the client's IP address. The /src/ ACL is preferred
> over/srcdomain/ because it does not require address-to-name lookups for
> each request.
>
>
> 10.01.2015 19:45, Prasad Yalla пишет:
> > I have a requirement to remove Referer header when a certain of my sites
> make a reference and not all.
> > I managed to remove Referer selectively based on the destination domain,
> but how do I do it based on the originating site?
> > Here is how it did for destination domain:
> >
> > acl referer_allowdst dstdomain google.com <http://google.com>
> <http://google.com>
> > header_access Referer deny referer_allowdst
> >
> > When i use srcdomain here it doesn't work. This is an urgent
> requirement, can someone help me with this please?
> >
> >
> > _______________________________________________
> > squid-users mailing list
> > squid-users at lists.squid-cache.org
> > http://lists.squid-cache.org/listinfo/squid-users
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBAgAGBQJUsaJyAAoJENNXIZxhPexG3xQH/je1rGfb0MfMzYbmHSMD2SL0
> Y2mc7hccrmoYpRTwjOCK1NmEvoenj3J6stbKGDidoB+BYhuUjt5/xJ+HDA3MjC7C
> q+zpt4SdumnXBWiK+tn/RP/pK/TnjqOWcnEpnvctdpXbjJuhUvwf3pZ9/7EG1wPs
> R86T8RURbKEBo1IfeSbQrjNWwxt93bt6bOjrRmnc1QEkh8TC+bNGYdug2RM3TkMl
> +FBJUL7H/bmlile1vRUot/jEWNWGPP4GyP8rZhp0UcCzepCIX0QW8SepefSmwkQk
> lavMU/hrHoIZQdioZkAw/s0uDxr2U3Z4zUg9kiQt58vC3DuWM96jqWndP1TkTug=
> =02mh
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20150111/f0f86d55/attachment.html>


More information about the squid-users mailing list