request_body capture regex

Musta Fa fam6837 at
Thu Apr 20 14:29:41 UTC 2017

is it possible to capture POST data, but as soon there is a "password" then
this word and its value to mask or exclude from log.

i was trying to split request_body, but it not working correct:

map $request_body $request_body_nopwd {
"~(.*)(&|%5B)password(%5D)?\=" $1;

also if request dont have password it returns empty value, etc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list