isPlainHostName()

This function returns true if the hostname contains no dots (for example, “http:// intranet”).

It is useful when applying exceptions for internal websites that may not require resolution of a hostname to IP address to determine if they are local.

Example:

if (isPlainHostName(host)) return "DIRECT";