(value: string)
| 353 | */ |
| 354 | const FORM_ENCODED_RE = /^[\w.\-+~*[\]%]+=[^&]*(?:&[\w.\-+~*[\]%]+=[^&]*)*$/ |
| 355 | function looksLikeFormEncoded(value: string): boolean { |
| 356 | if (!value || value.length > 8192) return false |
| 357 | return FORM_ENCODED_RE.test(value) |
| 358 | } |
| 359 | |
| 360 | /** Redact values in a form-urlencoded body where the param name matches sensitiveKeys. */ |
| 361 | function redactFormEncodedParams(value: string, sensitiveKeysLower: Set<string>): string { |