ITADN

Redact/remove request fields in logged messages

#227Closeddipack95 创建于 2025-02-14
D
dipack95commented
Hi -- we've been using Piko in some fashion for the past few weeks, testing it out to see how it works for us. One of the things I've noticed during testing is Piko logs [request contents](https://github.com/andydunstall/piko/blob/3508194379ca33db5039b73ec09c85d7441718d3/pkg/middleware/logger.go#L43) in their entirety. It would be helpful if there were a way to redact and/or remove certain properties from being logged. Either a block list or allow list approach would work. An example of sensitive information that is logged is the `X-Piko-Authorization` header, in the `request.request_headers` structured log field. We have other similarly sensitive fields that we do not wish logged. Please let me know if you'd appreciate code contributions to help solve this issue!
关闭于 2025-02-23 2 条评论