remote the use of SERVER_PORT in port detection.