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
Copy file name to clipboardExpand all lines: docs/extensions/x-sensitive-data.md
+44-9Lines changed: 44 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,21 @@
1
1
# `x-sensitive-data`
2
2
3
-
Automatically mask sensitive data in JSON output.
3
+
Automatically mask sensitive data in structured logs.
4
4
5
5
## Overview
6
6
7
-
The `x-sensitive-data` extension allows you to mark fields as containing sensitive information that should be automatically masked when marshaling to JSON. This is useful for preventing accidental logging or exposure of sensitive data like passwords, API keys, credit card numbers, etc.
7
+
The `x-sensitive-data` extension allows you to mark fields as containing sensitive information that should be automatically masked when logging. This is useful for preventing accidental exposure of sensitive data like passwords, API keys, credit card numbers, etc. in logs.
8
+
9
+
The extension generates two methods:
10
+
11
+
-**`Masked()`** - Returns a copy of the struct with sensitive fields masked
0 commit comments