Consider X-Forwarded-Host if proxy is trusted

When `trust proxy` is enabled, the protocol and the remote address are already taken from the `X-Forwarded-*` headers. This patch additionally does that for the `Host` header.