Search squid archive

Re: Configure squid based on content type of http response (RESOLUTION)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On October 31, 2007, Dmitry S. Makovey wrote:
> > #http_reply_access allow all
> >
> > acl plain_content rep_mime_type -i text/plain
> > # http_reply_access allow GET_method xml_content from_clients
> >
> > redirect_program /usr/local/bin/myscript
> > redirector_access plain_content
> >
> > http_reply_access allow all
>
> slightly modified version of this works on our boxes, with Squid2.5-STABLE3
> (RedHat AS3) limiting access to resources other than RSS feeds.

Update on this subject for history sake:

Our version didn't use redirector and I thought it would work, but it doesn't 
as redirector seem to fire up *before* you can check your "reply" so 
redirector_access never gets desired arguments and nothing gets redirected. 
However going by the lead from Amos here's what worked in my test lab:


error_directory /var/tmp/
# redirector_bypass off
acl plain_content rep_mime_type -i text/plain
http_reply_access deny plain_content

deny_info ERR_PLAIN_TEXT plain_content

where /var/tmp/ERR_PLAIN_TEXT is a plaintext file with a message for users.

-- 
Dmitry Makovey
Web Systems Administrator
Athabasca University
(780) 675-6245

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux