[squid-users] pattern match on User-Agent header
Berkes, David
David.J.Berkes at pjc.com
Fri Nov 20 21:37:02 UTC 2015
Hello.
I'm trying to create an ACL browser type to allow any User-Agent header with the string iPhone. I have tried this ACL various ways and cannot get it to work. Any help with the correct setup and/or regexp would be much appreciated. I have the ACL's commented out as when they are enabled, everything is allowed to pass without hitting the authentication.
### MY ACL's
acl iphone1 browser [(.*)(iPhone)(.*)]
acl iphone2 browser [.*\QiPhone\E.*]
### ACCESS.LOG
sc.iasds01.com xxx.xxx.xxx.xxx - - [20/Nov/2015:15:12:26 -0600] "CONNECT sc.iasds01.com:80 HTTP/1.1" 200 172 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 9_0 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13A344 Safari/601.1" TCP_TUNNEL:HIER_DIRECT
### squid.conf
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/squid_passwd
acl iphone1 browser [(.*)(iPhone)(.*)]
acl iphone2 browser [.*\QiPhone\E.*]
acl ncsa_users proxy_auth REQUIRED
http_access allow manager localhost
#http_access allow iphone1
#http_access allow iphone2
http_access allow ncsa_users
http_access deny all
________________________________
Piper Jaffray & Co. Since 1895. Member SIPC and NYSE. Learn more at www.piperjaffray.com. Piper Jaffray corporate headquarters is located at 800 Nicollet Mall, Minneapolis, MN 55402.
Piper Jaffray outgoing and incoming e-mail is electronically archived and recorded and is subject to review, monitoring and/or disclosure to someone other than the recipient. This e-mail may be considered an advertisement or solicitation for purposes of regulation of commercial electronic mail messages. If you do not wish to receive commercial e-mail communications from Piper Jaffray, go to: www.piperjaffray.com/do_not_email to review the details and submit your request to be added to the Piper Jaffray "Do Not E-mail Registry." For additional disclosure information see www.piperjaffray.com/disclosures
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20151120/efac7283/attachment.html>
More information about the squid-users
mailing list