Binance Connector JS
    Preparing search index...

    Function parseCustomHeaders

    • 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.

      Removes forbidden headers like 'host', 'authorization', and 'cookie', and sanitizes remaining header values to prevent injection of carriage return or line feed characters.