Headerify: { [P in keyof T]?: T[P] extends HeaderValue | undefined ? P extends string ? Lowercase<P> extends "set-cookie" ? T[P] extends HeaderValue[] ? T[P] | undefined : never : Lowercase<P> extends | "age" | "authorization" | "content-length" | "content-type" | "etag" | "expires" | "from" | "host" | "if-modified-since" | "if-unmodified-since" | "last-modified" | "location" | "max-forwards" | "proxy-authorization" | "referer" | "retry-after" | "server" | "user-agent" ? T[P] extends HeaderValue[] ? never : T[P] | undefined : T[P] | undefined : never : never} Type Parameters
- T extends object | undefined
Type of headers
Headerify
removes every properties that are not allowed in the HTTP headers type.Below are list of prohibited in HTTP headers.