In the proxy filter, if listening on port 80 or 443 there will be no port present in the Host: HTTP header. Just use the entire thing in these cases, and don't reject requests when no port is present in the Host: HTTP header.