Pages virtual host fails on headers with port

If a HTTP request comes in for Host: groupname.gitlab.com:80 or Host: groupname.gitlab.com:443 it fails with a 404 error even if that port matches the default port for the protocol specified. Most clients strip the port from the host header.