[squid-users] i want to block images with size more than 40 KB

Amos Jeffries squid3 at treenet.co.nz
Fri Mar 20 16:55:30 UTC 2015

On 21/03/2015 12:05 p.m., snakeeyes wrote:
> Hi amos , thanks for reply
> I have tried @ top of squidf.conf
> acl images rep_header Content-Type ^image/ ^x-image/  
> acl small rep_header Content-Length ^[1234]?[0-9]$  
> http_reply_access deny small images
> are you sure that its blocking images with size >40KB ????

Sorry I slightly mis-read your request. What I gave is blocking images
*smaller* than 40 bytes (see what I mean about cut-n-paste without

To block images *over* 40 bytes change that to:
 http_reply_access deny !small images

> also I didn’t see extensions like jpg or bmp or similar like that ??!!

Because HTTP does not transfer files. It transfers data. Sometimes data
can *also* be found inside "files", sometimes not.

HTTP Content-Type header describes what format the data is. In this case
you requested images in general, so thats the pattern I gave.


More information about the squid-users mailing list