Parses and sanitizes custom headers, filtering out forbidden headers.
Parameters
headers: Record<string,string|string[]>
The input headers to be parsed.
Returns Record<string,string|string[]>
A new object with sanitized and allowed headers.
Description
Removes forbidden headers like 'host', 'authorization', and 'cookie',
and sanitizes remaining header values to prevent injection of carriage return or line feed characters.
Parses and sanitizes custom headers, filtering out forbidden headers.