[squid-users] note macro - %{policy_}note passes old values along with new value

Amish anon.amish at gmail.com
Fri Dec 14 16:26:29 UTC 2018


I have setup auth_param as follows:

auth_param basic program /usr/lib/squid/user_auth

Where user_auth authenticates user from a database and replies with a 
kv-pair as follows.

OK policy_=onlysomesites

Where policy_ (with underscore) is user policy picked from database.

This policy is passed on to url_rewrite_program via url_rewrite_extras 
as above.

url_rewrite_program /usr/lib/squid/url_rewrite
url_rewrite_extras "policy=%{policy_}note"

url_rewrite reads URL and the policy supplied (policy=onlysomesites) and 
allows or denies URL based on the policy.

Now if I change the policy in database. (to say allsites). Then for new 
requests user_auth returns with:
OK policy_=allsites

Now I was expecting that %{policy_}note will pass on only latest value 
to url_rewrite but somehow it passes old value + new value.

i.e. it passes "policy=onlysomesites,allsites"

How to pass only the latest value with note macro?

Please guide

Thank you


More information about the squid-users mailing list