From cae90b1213c4c74b800083dbd9f0d1d855f3ffd5 Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Mon, 27 Apr 2020 12:18:14 +0200 Subject: [PATCH] wip --- app/Server/Http/Controllers/TunnelMessageController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Server/Http/Controllers/TunnelMessageController.php b/app/Server/Http/Controllers/TunnelMessageController.php index 9bed3af..a90df43 100644 --- a/app/Server/Http/Controllers/TunnelMessageController.php +++ b/app/Server/Http/Controllers/TunnelMessageController.php @@ -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');