MCP TypeScript SDK (V2)
    Preparing search index...
    • Parse and validate a Host header against an allowlist of hostnames (port-agnostic).

      • Input host header may include a port (e.g. localhost:3000) or IPv6 brackets (e.g. [::1]:3000).
      • Allowlist items should be hostnames only (no ports). For IPv6, include brackets (e.g. [::1]).

      Parameters

      • hostHeader: string | null | undefined
      • allowedHostnames: string[]

      Returns HostHeaderValidationResult