You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes - happy to review one!
Should it directly conditionally rely on the sensitive flag? Or introduce some new config option for encoders/decoders to control it?
Personally, I'd keep that simple, but that's not my project, so if you have something more involved in mind, I can go along.
My thinking is: no configuration, we check the sensitive flag, if it's true we log REDACTED (possibly inlude a hash of the value if this is not too expensive to do), otherwise we keep the existing behaviour (log the value).
The user of this lib can already define what headers are sensitive by calling encode and using the appropriate shape (as the doc mentions):
Makes sense. No hashing - we might be on a hot code path. For the value to log: SENSITIVE_REDACTED and clearly mention it in the docs. Thanks for pushing this idea!
Activity
Kriechi commentedon Mar 1, 2026
Yes - happy to review one!
Should it directly conditionally rely on the
sensitiveflag? Or introduce some new config option for encoders/decoders to control it?woodside-david-francoeur commentedon Mar 2, 2026
Personally, I'd keep that simple, but that's not my project, so if you have something more involved in mind, I can go along.
My thinking is: no configuration, we check the
sensitiveflag, if it's true we logREDACTED(possibly inlude a hash of the value if this is not too expensive to do), otherwise we keep the existing behaviour (log the value).The user of this lib can already define what headers are sensitive by calling
encodeand using the appropriate shape (as the doc mentions):wdyt?
Kriechi commentedon Mar 8, 2026
Makes sense. No hashing - we might be on a hot code path. For the value to log:
SENSITIVE_REDACTEDand clearly mention it in the docs. Thanks for pushing this idea!