Re: [squid-users] blocking mime types

From: Visolve Squid Development Team <squid@dont-contact.us>
Date: Thu, 9 Dec 2004 09:06:05 +0530

> I've tried a few examples and some suggestions I've done on searches
> and I can't seem to block mime types at all. In this example, should
> no GIF files be transfered to the users?
>
> acl deny_programs req_mime_type ^image/gif$
> acl deny_program2 rep_mime_type ^image/gif$
>
> http_access deny deny_programs
> http_access deny unsafe_domains
> http_access deny deny_program2
> http_access deny deny_files2
> http_access allow 192.168
> http_access allow 10.1.4
> http_access allow deny
>
> I've tried other mime types as well and they dont seem to get denied
> either. Shold the above example work or am I doing something wrong?
>

We can not control the rep_mime_type acl types using with http_access. We have to use http_reply_access to control rep_mime_type
acl's.
see TAG http_reply_access.

To block mime types in your acl setup then use as,

# Acl setup
acl deny_programs req_mime_type ^image/gif$
acl deny_program2 rep_mime_type ^image/gif$

# http_access - upstream
http_access deny deny_programs
http_access deny unsafe_domains
http_access deny deny_files2
http_access allow 192.168
http_access allow 10.1.4
http_access allow deny

# http_reply_access - downstream
http_reply_access deny program2
http_reply_access allow all

Best Wishes
Visolve Squid Development Team.
================================================================================================================
URL : http://squid.visolve.com/
mail : suppot@visolve.com
================================================================================================================
Received on Wed Dec 08 2004 - 20:48:07 MST

This archive was generated by hypermail pre-2.1.9 : Sat Jan 01 2005 - 12:00:02 MST