[squid-users] allowing zip only for a specific url regex

Amos Jeffries squid3 at treenet.co.nz
Tue May 5 12:26:31 UTC 2020


On 5/05/20 11:38 pm, robert k Wild wrote:
> hi all,
> 
> i wanto to allow only zip files via a specific url regex
> 
> atm im allowing all attachments
> 
> ^https://attachments.office.net/owa/.*
> 
> could i do this to lock it down to only zips
> 
> ^https://attachments.office.net/owa/.zip
> 

That regex will only match a small set of URLs which are unlikely ever
to exist.

What you want is:

 acl downloads url_regex https://attachments.office.net/owa/
 acl dotZip urlpath_regex \.zip(\?)?.*$
 http_access allow downloads !dotZip

 acl zipCt rep_header Content-Type application/zip
 http_reply_access deny zipCt


Amos


More information about the squid-users mailing list