Hello,
On 02.03.18 12:28, Aymeric Moizard wrote: > > Hi list! > > I'm trying to remove Proxy-Authorization dedicated > to local subscriber without -and not the other ones > dedicated to other server- > > I realized that "consume_credentials" doesn't work > because it requires that a call to "www_authorize, > proxy_authorize, www_authenticate or proxy_authenticate" > has been made before. I have a use-case where this isn't > called. > > I don't want to use such code: > > if (is_present_hf("Proxy-Authorization")) { > remove_hf("Proxy-Authorization"); > } > Because this may remove a "Proxy-Authorization" > for another service. > > I have seen this: has_credentials but it doesn't help > to know which header is the one containing the header... > > Any good way to find the header and index? > And then remove it with remove _hf_value2? > I haven't looked for the options offered by the textopsx module, being added by ser devs in the past, but if your case of not doing www/proxy_authenticate() or auth_check() is to avoid a database query, then do pv_auth_check(...) with a random password and the proper relam. Ignore the result, the header is parsed, even if authentication fails, and you should be able to use consume_credentials(). Cheers, Daniel -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users