--- fewobepa/korura/Routing/UrlGenerator.php 2015-10-25 09:56:30.000000000 +0100 +++ fewobepa/korura/Routing/UrlGenerator.php 2016-11-14 19:35:29.104692403 +0100 @@ -38,11 +38,23 @@ { $serverParams = $this->request->getServerParams(); - $domainUrl = 'http://' . $serverParams['SERVER_NAME']; + if ($serverParams['HTTPS'] === 'on' || $serverParams["REQUEST_SCHEME"] === 'https') + { + $domainUrl = 'https://' . $serverParams['SERVER_NAME']; - if($serverParams['SERVER_PORT'] !== '80') + if($serverParams['SERVER_PORT'] !== '443') + { + $domainUrl .= ':' . $serverParams['SERVER_PORT']; + } + } + else { - $domainUrl .= ':' . $serverParams['SERVER_PORT']; + $domainUrl = 'http://' . $serverParams['SERVER_NAME']; + + if($serverParams['SERVER_PORT'] !== '80') + { + $domainUrl .= ':' . $serverParams['SERVER_PORT']; + } } if($withSubPaths)