Kind: Function
Source: atloria-monorepo/packages/ui-core/src/components/api-explorer/permalink.ts
A request body, minus anything credential-shaped.
A JSON body is walked so that {"email":…, "password":…} on a login operation loses only the
password. A body that is NOT JSON cannot be walked, so it travels only when nothing in it
looks like a credential — the conservative direction, because the alternative is putting a
reader's token into a link they are about to paste into a chat room.
Signature
tsfunction scrubBody(body: string | undefined, secrets: string[]): string | undefined
Parameters
| Name | Type |
|---|---|
body | `string |
secrets | string[] |
Returns: string | undefined
Was this page helpful?