req.host

The hostname of this request, without the port number, as specified by its “Host” header.

Usage

  1. req.host;

Example

If this request’s “Host” header was: “ww3.staging.ibm.com:1492”:

  1. req.host;
  2. // -> "ww3.staging.ibm.com"