This commit is contained in:
Marcel Pociot
2020-04-27 12:18:14 +02:00
parent ee232cea83
commit cae90b1213

View File

@@ -83,7 +83,11 @@ class TunnelMessageController extends PostController
{
$request::setTrustedProxies([$controlConnection->socket->remoteAddress], Request::HEADER_X_FORWARDED_ALL);
$host = $this->configuration->hostname() . ($this->configuration->port() === 443) ?: ":{$this->configuration->port()}";
$host = $this->configuration->hostname();
if ($this->configuration->port() !== 443) {
$host .= ":{$this->configuration->port()}";
}
$request->headers->set('Host', $controlConnection->host);
$request->headers->set('X-Forwarded-Proto', $request->isSecure() ? 'https' : 'http');