Re: [squid-users] mime type based extension blocking

From: Christoph Haas <email@dont-contact.us>
Date: Sun, 23 May 2004 20:16:28 +0200

On Sat, May 22, 2004 at 11:05:41PM -0700, saravanan ganapathy wrote:
> I am very new to this group and coudn't find answer
> for my query in the archives.
>
> I want to block certain extensions to get
> downloaded.(for ex. exe)
> It works fine with the following rule.
>
> acl exe-filter urlpath_regex -i \.exe\?*
> http_access deny exe-filter
>
> But it also blocks urls which contains exe in it,
> though its not an exe download.I heard that we can
> solve this issue by implementing squid2.5 and using
> http_reply_access & rep_mime_type.

Use the rep_mime_type if you can. That allows you to filter based on the MIME
type that the web server returns.

By the way... this may be better if you insist on using the urlpath_regex:

acl exe-filter urlpath_regex -i \.(zip|exe|cmd)($|\?)

 Christoph

-- 
~
~
".signature" [Modified] 3 lines --100%--                3,41         All
Received on Sun May 23 2004 - 12:16:34 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Jun 01 2004 - 12:00:02 MDT