Modify getServerName() and getServerPort() to reference "Host" header.