This commit is contained in:
2021-08-30 15:01:15 +08:00
parent f63d66fbda
commit ddf2caaccc
+2 -2
View File
@@ -152,7 +152,7 @@ class Uri implements UriInterface
*/
public function getDefaultPort(): int
{
return 80;
return $this->scheme == 'https' ? 443 : 80;
}
@@ -224,7 +224,7 @@ class Uri implements UriInterface
$uri = new Uri();
$uri = $uri->withScheme(!empty($server['https']) && $server['https'] !== 'off' ? 'https' : 'http');
if (isset($request->header['x-forwarded-proto'])) {
$uri->withScheme($request->header['x-forwarded-proto']);
$uri->withScheme($request->header['x-forwarded-proto'])->withPort(443);
}
$hasPort = false;