import { IncomingMessage } from "http" ; export const readHeader = ( req , headerName ) : string => { const headerValue = req . headers [ headerName . toLocaleLowerCase ( ) ] ; return Array . isArray ( headerValue ) ? headerValue [ 0 ] : headerValue ; } ;