We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6c217a commit efd618dCopy full SHA for efd618d
2 files changed
lib/req.js
@@ -19,7 +19,9 @@ const headerRedact = fastRedact({
19
'["x-forwarded-for"]',
20
'["proxy-authorization"]'
21
],
22
- serialize: (val) => JSON.parse(JSON.stringify(val))
+ serialize: (val) => typeof structuredClone === 'function'
23
+ ? structuredClone(val)
24
+ : JSON.parse(JSON.stringify(val))
25
})
26
27
const rawSymbol = Symbol('pino-raw-req-ref')
lib/res.js
@@ -13,7 +13,9 @@ const headerRedact = fastRedact({
13
'["x-real-ip"]',
14
'["x-forwarded-for"]'
15
16
17
18
const rawSymbol = Symbol('pino-raw-res-ref')
0 commit comments