@ndan wrote:
I’m trying to hide sensitive data from the logs.
Example:
www.example.com/api?token=sensitive&order_by=id
I want to mask/hide “sensitive”, (eg/api?token=****&order_by=id
)
regsub()
doesn’t work due to the parser limitation (]
and)
are not allowed), so I can’t useregsub(token=[^&]+,token=****,gi)
# In this example regsub removes everything after token, but I want to mask only token and keep the rest log-format "%[capture.req.uri,regsub(token=.+,token=****,g)]" # => /api?token=****
Posts: 2
Participants: 2