[squid-users] Pass through some requests in a reversed-proxy setup

From: Rune Langseid <[email protected]>
Date: Fri, 26 Oct 2007 19:10:36 +0200

Hi there,

I'm trying to set up a reverse-proxy in front of an CMS.
Since there are both anonymous users, and logged in users accessing this
system I only want to serve squid-cache to the anonymous users.

I was thinking of setting a cookie called "Authenticated" when the user
logs in as this is easy to check with "acl"

Like this:
acl cookie_is_set req_header Cookie ^.*Authenticated.*

However, I am facing a few problems then trying to let these user
through Squid.

I have tried this:
acl cookie_is_set req_header Cookie ^.*Authenticated.*
cache deny cookie_is_set

This setup works in a way, but Squid also deletes the cache-object used
by the anonymous users which is something I don't want. Could this be a bug?

I have also been experimenting with "always_direct" with no luck.
Like this:
always_direct allow cookie_is_set

I guess I am missing something important here...
Is there another way to solve this?
Eg by using cache_peer and cache_peer_access?

I'm using Squid 2.6.5, and my squid.conf looks like this:

--
cache_peer localhost parent 80 0 originserver
http_port 8080 vhost
acl cookie_is_set req_header Cookie ^.*Authenticated.*
cache deny cookie_is_set
#always_direct allow cookie_is_set
acl all src 0.0.0.0/0.0.0.0
http_access allow all
--
Thanks for reading this,
Regards Rune
Received on Fri Oct 26 2007 - 11:10:51 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Nov 01 2007 - 13:00:02 MDT