detectServerHost static method
Detects the host name of the request's destination server.
req
an HTTP RequestContext request to process. Returns the destination server's host name.
Implementation
static String detectServerHost(Request req) {
return req.url.host.toString(); // socket.localAddress;
}