MCPcopy Index your code
hub / github.com/codeaashu/claude-code / redactHeaders

Function redactHeaders

src/utils/plugins/marketplaceManager.ts:1186–1192  ·  view source on GitHub ↗

* Redact header values for safe logging * * @param headers - Headers to redact * @returns Headers with values replaced by '***REDACTED***'

(
  headers: Record<string, string>,
)

Source from the content-addressed store, hash-verified

1184 * @returns Headers with values replaced by '***REDACTED***'
1185 */
1186function redactHeaders(
1187 headers: Record<string, string>,
1188): Record<string, string> {
1189 return Object.fromEntries(
1190 Object.entries(headers).map(([key]) => [key, '***REDACTED***']),
1191 )
1192}
1193
1194/**
1195 * Redact userinfo (username:password) in a URL to avoid logging credentials.

Callers 1

cacheMarketplaceFromUrlFunction · 0.85

Calls 1

entriesMethod · 0.80

Tested by

no test coverage detected