Skip to content

Documentation / @tenancy-node/core / hostnameOf

Function: hostnameOf() ​

hostnameOf(host): string | undefined

Defined in: core/src/application/request-host.ts:5

Extrae el hostname de un header Host: quita el puerto, el punto final y pasa a minúsculas. 'Bolivar.TuApp.com:3000' → 'bolivar.tuapp.com'. '[::1]:3000' → '::1'.

Parameters ​

host ​

string | undefined

Returns ​

string | undefined

Publicado bajo la licencia MIT.