The HTTP_HOST verification failed if the proxy server port was
different to the local webserver port, due to an assumption in
hostHeaderValueMatchesTrustedHostsPattern() that concluded
that the local webserver port needs to match the default
port of the proxy server.
In case a HTTPS termination proxy is used, that
assumption can not be made, as it is common
practice to use HTTP backends behind a HTTPS
proxy in private networks. Therefore the port
is now verified against the default port of
the current webserver, not a possible proxy server.
Scenario:
* Proxy Server HTTPS (SSL termination) => Port 443
* Application Server HTTP => Port 80
* Default trustedHostsPattern setting
It was previously required to configure a (slow)
trustedHostsPattern to circumvent this issue.