How to redact query string parameter from fastify pino logs

806 Views Asked by At

I'm using Fastify and would like to redact querystring parameters in the logged request, eg:

"url": "/auth?token=XXXXXXX"

I've looked through the pino documentation on redaction, and can't find how to replace just part of the url value and not the whole thing.

How can I redact just part of the URL? Is it possible to specify a regex somewhere?

0

There are 0 best solutions below