detectServerPort static method
Detects the request's destination port number.
req
an HTTP RequestContext request to process. Returns the detected port number or80
(if none are detected).
Implementation
static String detectServerPort(Request req) {
return req.url.port.toString(); //req.socket.localPort;
}