[squid-users] whats wrong with this url regex line

robert k Wild robertkwild at gmail.com
Sun Jan 19 13:51:16 UTC 2020


thanks Amos

#allow special URL paths
acl special_url url_regex "/usr/local/squid/etc/urlspecial.txt"
http_access allow special_url
#
#deny MIME types
acl mimetype rep_mime_type "/usr/local/squid/etc/mimedeny.txt"
http_reply_access allow special_url
http_reply_access deny mimetype

the reason why i added this line

http_reply_access allow special_url

in my mime lines is because

http://updater.maxon.net/server_test
<http://updater.maxon.net/server_test.*>

wants to download an octet stream and it was keep on denying it


On Sun, 19 Jan 2020 at 09:23, Amos Jeffries <squid3 at treenet.co.nz> wrote:

> On 18/01/20 3:51 am, robert k Wild wrote:
> > smashed it -
> >
> > acl special_url url_regex ^http://updater.maxon.net/server_test.*
> > http_access allow special_url
> >
>
> It should work without the anchor and suffix. Perhapse the URL is not
> actually that string?
>
>
>  * any (.*) at beginning or end is assumed, so are stripped away by
> Squid config loader.
>
>  * the ^ anchor is only necessary to forbid sub-URL matches. eg URLs like:
>   http://hello/q?http://updater.maxon.net/server_test
>
>  * any characters within the URL which are special to regex are handled
> as those *regex* commands. Not characters in the URL.
>
>  These characters may clash between regex and URL:
>
>     . ? ( ) [ ] - + * \
>
>
> Amos
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>


-- 
Regards,

Robert K Wild.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20200119/3a6867b4/attachment.html>


More information about the squid-users mailing list